Use regex category validation in binarytree.populate().
authorZac Medico <zmedico@gentoo.org>
Fri, 21 Dec 2007 01:28:17 +0000 (01:28 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 21 Dec 2007 01:28:17 +0000 (01:28 -0000)
(trunk r9011:9013)

svn path=/main/branches/2.1.2/; revision=9014

pym/portage.py

index 08accebd42daf75501b71b702d5534f22db5db9a..00799161584cfa76090e41904f937f16d2f171bb 100644 (file)
@@ -7685,7 +7685,7 @@ class binarytree(object):
                                        if mycpv in pkg_paths:
                                                # All is first, so it's preferred.
                                                continue
-                                       if not mycat:
+                                       if not self.dbapi._category_re.match(mycat):
                                                writemsg(("!!! Binary package has an " + \
                                                        "unrecognized category: '%s'\n") % full_path,
                                                        noiselevel=-1)
@@ -7725,7 +7725,7 @@ class binarytree(object):
                                        continue
                                mycat=self.remotepkgs[mypkg]["CATEGORY"].strip()
                                fullpkg=mycat+"/"+mypkg[:-5]
-                               if not mycat:
+                               if not self.dbapi._category_re.match(mycat):
                                        writemsg(("!!! Remote binary package has an " + \
                                                "unrecognized category: '%s'\n") % fullpkg,
                                                noiselevel=-1)