summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/portage/dbapi/__init__.py3
-rw-r--r--pym/portage/dbapi/porttree.py3
2 files changed, 5 insertions, 1 deletions
diff --git a/pym/portage/dbapi/__init__.py b/pym/portage/dbapi/__init__.py
index a1de0695f..0e473ddd1 100644
--- a/pym/portage/dbapi/__init__.py
+++ b/pym/portage/dbapi/__init__.py
@@ -13,7 +13,8 @@ from portage.versions import catpkgsplit, catsplit, pkgcmp
class dbapi(object):
- _category_re = re.compile(r'^[+\w][-\.+\w]*$')
+ _category_re = re.compile(r'^\w[-.+\w]*$')
+ _pkg_dir_name_re = re.compile(r'^\w[-+\w]*$')
def __init__(self):
pass
diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py
index 7df97959d..7ce65b998 100644
--- a/pym/portage/dbapi/porttree.py
+++ b/pym/portage/dbapi/porttree.py
@@ -493,6 +493,9 @@ class portdbapi(dbapi):
self._non_category_dirs.match(x):
continue
for y in listdir(oroot+"/"+x, EmptyOnError=1, ignorecvs=1, dirsonly=1):
+ if not self._pkg_dir_name_re.match(y) or \
+ y == "CVS":
+ continue
d[x+"/"+y] = None
l = d.keys()
l.sort()