def _repack_pkgs(pkgs, normalize=True):
 if (normalize and ('pkg.normalize_name' in __salt__)):
  _normalize_name = __salt__['pkg.normalize_name']
 else:
  _normalize_name = (lambda pkgname: pkgname)
 return dict([(_normalize_name(str(x)), (str(y) if (y is not None) else y)) for (x, y) in six.iteritems(salt.utils.repack_dictlist(pkgs))])

def _repack_pkgs ( pkgs , normalize = True ) : if ( normalize and ( 'pkg.normalize_name' in __salt__ ) ) : _normalize_name = __salt__ [ 'pkg.normalize_name' ] else : _normalize_name = ( lambda pkgname : pkgname ) return dict ( [ ( _normalize_name ( str ( x ) ) , ( str ( y ) if ( y is not None ) else y ) ) for ( x , y ) in six . iteritems ( salt . utils . repack_dictlist ( pkgs ) ) ] )
repack packages specified using "pkgs" argument to pkg states into a single dictionary .