def remove_lock(packages, **kwargs):
 locks = list_locks()
 try:
  packages = list(__salt__['pkg_resource.parse_targets'](packages)[0].keys())
 except MinionError as exc:
  raise CommandExecutionError(exc)
 removed = []
 missing = []
 for pkg in packages:
  if locks.get(pkg):
   removed.append(pkg)
  else:
   missing.append(pkg)
 if removed:
  __zypper__.call('rl', *removed)
 return {'removed': len(removed), 'not_found': missing}

def remove_lock ( packages , ** kwargs ) : locks = list_locks ( ) try : packages = list ( __salt__ [ 'pkg_resource.parse_targets' ] ( packages ) [ 0 ] . keys ( ) ) except MinionError as exc : raise CommandExecutionError ( exc ) removed = [ ] missing = [ ] for pkg in packages : if locks . get ( pkg ) : removed . append ( pkg ) else : missing . append ( pkg ) if removed : __zypper__ . call ( 'rl' , * removed ) return { 'removed' : len ( removed ) , 'not_found' : missing }
remove specified package lock .