summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-01-11 23:15:19 +0000
committerZac Medico <zmedico@gentoo.org>2007-01-11 23:15:19 +0000
commita832a5ea8b5c7ff34ebf1a6bd87f5dc3dd58041a (patch)
tree5713f89388d92729f1a5cf106ead192d389cd155
parent4990ea47957fe42a27c235feba4f3d1bdc338f09 (diff)
downloadportage-a832a5ea8b5c7ff34ebf1a6bd87f5dc3dd58041a.tar.gz
portage-a832a5ea8b5c7ff34ebf1a6bd87f5dc3dd58041a.tar.bz2
portage-a832a5ea8b5c7ff34ebf1a6bd87f5dc3dd58041a.zip
Allow catpkgsplit to be less strict for atoms that come from installed packages (for backward compatibility).
svn path=/main/trunk/; revision=5577
-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)