Validate categories. (trunk r15305)
authorZac Medico <zmedico@gentoo.org>
Tue, 2 Mar 2010 19:51:33 +0000 (19:51 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 2 Mar 2010 19:51:33 +0000 (19:51 -0000)
svn path=/main/branches/2.1.7/; revision=15540

pym/portage/__init__.py

index 8f4ef455be75d09786c818d8cecddcd67b925ae2..8aece25b9923ab708bacbd3970fd9d5896807949 100644 (file)
@@ -2102,7 +2102,8 @@ class config(object):
                        #getting categories from an external file now
                        categories = [grabfile(os.path.join(x, "categories")) for x in locations]
                        self.categories = tuple(sorted(
-                               stack_lists(categories, incremental=1)))
+                               x for x in stack_lists(categories, incremental=1)
+                               if dbapi._category_re.match(x) is not None))
                        del categories
 
                        archlist = [grabfile(os.path.join(x, "arch.list")) for x in locations]