summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-12-21 01:23:28 +0000
committerZac Medico <zmedico@gentoo.org>2007-12-21 01:23:28 +0000
commit9d62b7ddc03f0e3e07aafc9dd8751b163791f7fd (patch)
tree04699da70a4a7ffdb050da60c12adec60070590c
parenteedeb52d39a70a253b33f7ce8e78bb05ff7f29bd (diff)
downloadportage-9d62b7ddc03f0e3e07aafc9dd8751b163791f7fd.tar.gz
portage-9d62b7ddc03f0e3e07aafc9dd8751b163791f7fd.tar.bz2
portage-9d62b7ddc03f0e3e07aafc9dd8751b163791f7fd.zip
Use regex category validation in binarytree.populate().
svn path=/main/trunk/; revision=9012
-rw-r--r--pym/portage/dbapi/bintree.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py
index e950b2052..91695a456 100644
--- a/pym/portage/dbapi/bintree.py
+++ b/pym/portage/dbapi/bintree.py
@@ -494,7 +494,7 @@ class binarytree(object):
if mycpv in pkg_paths:
# All is first, so it's preferred.
continue
- if not mycat:
+ if not self._category_re.match(mycat):
writemsg(("!!! Binary package has an " + \
"unrecognized category: '%s'\n") % full_path,
noiselevel=-1)
@@ -654,7 +654,7 @@ class binarytree(object):
continue
mycat = self.remotepkgs[mypkg]["CATEGORY"].strip()
fullpkg = mycat+"/"+mypkg[:-5]
- if not mycat:
+ if not self._category_re.match(mycat):
writemsg(("!!! Remote binary package has an " + \
"unrecognized category: '%s'\n") % fullpkg,
noiselevel=-1)