from portage.cache.cache_errors import CacheError, StatCollision
from portage.util import writemsg_level
from portage import cpv_getkey
+from portage.dep import isjustname
def parse_args(args):
usage = "egencache [options] --update [atom] ..."
except portage.exception.InvalidAtom:
parser.error('Invalid atom: %s' % (atom,))
- if str(atom) != atom.cp:
+ if not isjustname(atom):
parser.error('Atom is too specific: %s' % (atom,))
return parser, options, args
import portage
portage.proxy.lazyimport.lazyimport(globals(),
- 'portage.dep:dep_getkey,match_from_list',
+ 'portage.dep:dep_getkey,isjustname,match_from_list',
'portage.output:EOutput,colorize',
'portage.update:update_dbentries',
'portage.util:ensure_dirs,normalize_path,writemsg,writemsg_stdout',
newcp = mylist[2]
# sanity check
for atom in (origcp, newcp):
- if atom.cp != atom:
+ if not isjustname(atom):
raise InvalidPackageName(str(atom))
origcat = origcp.split("/")[0]
mynewcat = newcp.split("/")[0]
import portage
portage.proxy.lazyimport.lazyimport(globals(),
'portage.checksum:_perform_md5_merge@perform_md5',
- 'portage.dep:dep_getkey,match_from_list,' + \
+ 'portage.dep:dep_getkey,isjustname,match_from_list,' + \
'use_reduce,paren_reduce',
'portage.elog:elog_process',
'portage.elog.filtering:filter_mergephases,filter_unmergephases',
# sanity check
for atom in (origcp, newcp):
- if atom.cp != atom:
+ if not isjustname(atom):
raise InvalidPackageName(str(atom))
origmatches = self.match(origcp, use_cache=0)
moves = 0
from portage import _unicode_encode
import portage
portage.proxy.lazyimport.lazyimport(globals(),
- 'portage.dep:Atom,dep_getkey,get_operator,isvalidatom,remove_slot',
+ 'portage.dep:Atom,dep_getkey,get_operator,isjustname,isvalidatom,' + \
+ 'remove_slot',
'portage.util:ConfigProtect,grabfile,new_protect_filename,' + \
'normalize_path,write_atomic,writemsg',
'portage.versions:ververify'