def _unify_keywords():
 old_path = BASE_PATH.format('keywords')
 if os.path.exists(old_path):
  if os.path.isdir(old_path):
   for triplet in os.walk(old_path):
    for file_name in triplet[2]:
     file_path = '{0}/{1}'.format(triplet[0], file_name)
     with salt.utils.fopen(file_path) as fh_:
      for line in fh_:
       line = line.strip()
       if (line and (not line.startswith('#'))):
        append_to_package_conf('accept_keywords', string=line)
   shutil.rmtree(old_path)
  else:
   with salt.utils.fopen(old_path) as fh_:
    for line in fh_:
     line = line.strip()
     if (line and (not line.startswith('#'))):
      append_to_package_conf('accept_keywords', string=line)
   os.remove(old_path)

def _unify_keywords ( ) : old_path = BASE_PATH . format ( 'keywords' ) if os . path . exists ( old_path ) : if os . path . isdir ( old_path ) : for triplet in os . walk ( old_path ) : for file_name in triplet [ 2 ] : file_path = '{0}/{1}' . format ( triplet [ 0 ] , file_name ) with salt . utils . fopen ( file_path ) as fh_ : for line in fh_ : line = line . strip ( ) if ( line and ( not line . startswith ( '#' ) ) ) : append_to_package_conf ( 'accept_keywords' , string = line ) shutil . rmtree ( old_path ) else : with salt . utils . fopen ( old_path ) as fh_ : for line in fh_ : line = line . strip ( ) if ( line and ( not line . startswith ( '#' ) ) ) : append_to_package_conf ( 'accept_keywords' , string = line ) os . remove ( old_path )
merge /etc/portage/package .