diff options
Diffstat (limited to 'pym')
-rw-r--r-- | pym/portage.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pym/portage.py b/pym/portage.py index bfb330095..c9dfe0d77 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -5791,6 +5791,7 @@ class portagetree: class dbapi: + _category_re = re.compile(r'^[+\w][-\.+\w]*$') def __init__(self): pass @@ -6078,7 +6079,6 @@ class bindbapi(fakedbapi): return fakedbapi.cpv_all(self) class vardbapi(dbapi): - _category_re = re.compile(r'^[+\w][-\.+\w]*$') def __init__(self, root, categories=None, settings=None, vartree=None): self.root = root[:] #cache for category directory mtimes @@ -7192,7 +7192,10 @@ class portdbapi(dbapi): self.xcache["match-all"][mycp] = cachelist return cachelist[:] mysplit = mycp.split("/") - invalid_category = mysplit[0] not in self._categories + if self.mysettings.profile_path: + invalid_category = mysplit[0] not in self._categories + else: + invalid_category = not self._category_re.match(mysplit[0]) d={} if mytree: mytrees = [mytree] |