def transaction_exists(pkglist):
 conflicts = []
 if (not transaction_helpers):
  return conflicts
 pkglist_nvreas = []
 for pkg in pkglist:
  pkglist_nvreas.append(splitFilename(pkg))
 unfinished_transactions = find_unfinished_transactions()
 for trans in unfinished_transactions:
  steps = find_ts_remaining(trans)
  for step in steps:
   (action, step_spec) = step
   (n, v, r, e, a) = splitFilename(step_spec)
   for pkg in pkglist_nvreas:
    label = ('%s-%s' % (n, a))
    if ((n == pkg[0]) and (a == pkg[4])):
     if (label not in conflicts):
      conflicts.append(('%s-%s' % (n, a)))
     break
 return conflicts

def transaction_exists ( pkglist ) : conflicts = [ ] if ( not transaction_helpers ) : return conflicts pkglist_nvreas = [ ] for pkg in pkglist : pkglist_nvreas . append ( splitFilename ( pkg ) ) unfinished_transactions = find_unfinished_transactions ( ) for trans in unfinished_transactions : steps = find_ts_remaining ( trans ) for step in steps : ( action , step_spec ) = step ( n , v , r , e , a ) = splitFilename ( step_spec ) for pkg in pkglist_nvreas : label = ( '%s-%s' % ( n , a ) ) if ( ( n == pkg [ 0 ] ) and ( a == pkg [ 4 ] ) ) : if ( label not in conflicts ) : conflicts . append ( ( '%s-%s' % ( n , a ) ) ) break return conflicts
checks the package list to see if any packages are involved in an incomplete transaction .