diff options
-rw-r--r-- | pym/portage/dbapi/__init__.py | 1 | ||||
-rw-r--r-- | pym/portage/dbapi/porttree.py | 11 |
2 files changed, 7 insertions, 5 deletions
diff --git a/pym/portage/dbapi/__init__.py b/pym/portage/dbapi/__init__.py index 53adfbe74..cddf04ab0 100644 --- a/pym/portage/dbapi/__init__.py +++ b/pym/portage/dbapi/__init__.py @@ -20,7 +20,6 @@ from portage.localization import _ class dbapi(object): _category_re = re.compile(r'^\w[-.+\w]*$') - _pkg_dir_name_re = re.compile(r'^\w[-+\w]*$') _categories = None _use_mutable = False _known_keys = frozenset(x for x in auxdbkeys diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py index c72e17812..5014d2103 100644 --- a/pym/portage/dbapi/porttree.py +++ b/pym/portage/dbapi/porttree.py @@ -10,7 +10,7 @@ portage.proxy.lazyimport.lazyimport(globals(), 'portage.checksum', 'portage.data:portage_gid,secpass', 'portage.dbapi.dep_expand:dep_expand', - 'portage.dep:dep_getkey,match_from_list,use_reduce', + 'portage.dep:Atom,dep_getkey,match_from_list,use_reduce', 'portage.env.loaders:KeyValuePairFileLoader', 'portage.package.ebuild.doebuild:doebuild', 'portage.util:ensure_dirs,shlex_split,writemsg,writemsg_level', @@ -768,10 +768,13 @@ class portdbapi(dbapi): for x in categories: for oroot in trees: for y in listdir(oroot+"/"+x, EmptyOnError=1, ignorecvs=1, dirsonly=1): - if not self._pkg_dir_name_re.match(y) or \ - y == "CVS": + try: + atom = Atom("%s/%s" % (x, y)) + except InvalidAtom: + continue + if atom != atom.cp: continue - d[x+"/"+y] = None + d[atom.cp] = None l = list(d) l.sort() return l |