diff options
-rw-r--r-- | pym/portage/dbapi/bintree.py | 8 | ||||
-rw-r--r-- | pym/portage/dbapi/vartree.py | 9 |
2 files changed, 8 insertions, 9 deletions
diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py index b96f4d4fa..734eb5418 100644 --- a/pym/portage/dbapi/bintree.py +++ b/pym/portage/dbapi/bintree.py @@ -6,7 +6,7 @@ __all__ = ["bindbapi", "binarytree"] import portage portage.proxy.lazyimport.lazyimport(globals(), - 'portage.dep:dep_getkey,isjustname,isvalidatom,match_from_list', + 'portage.dep:dep_getkey,match_from_list', 'portage.output:EOutput,colorize', 'portage.update:update_dbentries', 'portage.util:ensure_dirs,normalize_path,writemsg,writemsg_stdout', @@ -230,9 +230,9 @@ class binarytree(object): origcp = mylist[1] newcp = mylist[2] # sanity check - for cp in [origcp, newcp]: - if not (isvalidatom(cp) and isjustname(cp)): - raise InvalidPackageName(cp) + for atom in (origcp, newcp): + if atom.cp != atom: + raise InvalidPackageName(str(atom)) origcat = origcp.split("/")[0] mynewcat = newcp.split("/")[0] origmatches=self.dbapi.cp_list(origcp) diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index 905dc9c30..23c76bce4 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -9,7 +9,7 @@ __all__ = ["PreservedLibsRegistry", "LinkageMap", import portage portage.proxy.lazyimport.lazyimport(globals(), 'portage.checksum:_perform_md5_merge@perform_md5', - 'portage.dep:dep_getkey,isjustname,isvalidatom,match_from_list,' + \ + 'portage.dep:dep_getkey,match_from_list,' + \ 'use_reduce,paren_reduce', 'portage.elog:elog_process', 'portage.elog.filtering:filter_mergephases,filter_unmergephases', @@ -873,9 +873,9 @@ class vardbapi(dbapi): newcp = mylist[2] # sanity check - for cp in [origcp, newcp]: - if not (isvalidatom(cp) and isjustname(cp)): - raise InvalidPackageName(cp) + for atom in (origcp, newcp): + if atom.cp != atom: + raise InvalidPackageName(str(atom)) origmatches = self.match(origcp, use_cache=0) moves = 0 if not origmatches: @@ -1767,7 +1767,6 @@ class vartree(object): returnme.append(appendme) return returnme - def getslot(self, mycatpkg): "Get a slot for a catpkg; assume it exists." try: |