Allow catpkgsplit to be less strict for atoms that come from installed packages ...
authorZac Medico <zmedico@gentoo.org>
Thu, 11 Jan 2007 23:15:19 +0000 (23:15 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 11 Jan 2007 23:15:19 +0000 (23:15 -0000)
svn path=/main/trunk/; revision=5577

pym/portage_versions.py

index dffcdd3b14756cddcba135607adc1577d0ee9c63..b80e3739edb3a05a15f70bad811da6bef7d7aeef 100644 (file)
@@ -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)