summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/portage_versions.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/pym/portage_versions.py b/pym/portage_versions.py
index dffcdd3b1..b80e3739e 100644
--- a/pym/portage_versions.py
+++ b/pym/portage_versions.py
@@ -270,6 +270,7 @@ def catpkgsplit(mydata,silent=1):
# Categories may contain a-zA-z0-9+_- but cannot start with -
global _valid_category
+ import portage_dep
try:
if not catcache[mydata]:
return None
@@ -282,7 +283,8 @@ def catpkgsplit(mydata,silent=1):
retval=["null"]
p_split=pkgsplit(mydata,silent=silent)
elif len(mysplit)==2:
- if not _valid_category.match(mysplit[0]):
+ if portage_dep._dep_check_strict and \
+ not _valid_category.match(mysplit[0]):
raise InvalidData("Invalid category in %s" %mydata )
retval=[mysplit[0]]
p_split=pkgsplit(mysplit[1],silent=silent)