Omit non-existent files from the config._pkeywords_list
authorZac Medico <zmedico@gentoo.org>
Sat, 21 Aug 2010 19:58:50 +0000 (12:58 -0700)
committerZac Medico <zmedico@gentoo.org>
Sat, 21 Aug 2010 19:58:50 +0000 (12:58 -0700)
stack (stores data for profile package.keywords). This isn't
feasible for package.use (among other package.* files such
as package.use.mask) since it is stacked in layers with
make.defaults USE, and the layer indices need to align.

pym/portage/package/ebuild/config.py

index 09595791885d57e18e06a2478a08139a3d145d37..7a1f640b6f0ae24e2d81d01ddc46b3b84ba30506 100644 (file)
@@ -699,6 +699,13 @@ class config(object):
                                os.path.join(x, "package.keywords"), recursive=1) \
                                for x in self.profiles]
                        for pkeyworddict in rawpkeywords:
+                               if not pkeyworddict:
+                                       # Omit non-existent files from the stack. This isn't
+                                       # feasible for package.use (among other package.*
+                                       # files such as package.use.mask) since it is stacked
+                                       # in layers with make.defaults USE, and the layer
+                                       # indices need to align.
+                                       continue
                                cpdict = {}
                                for k, v in pkeyworddict.items():
                                        cpdict.setdefault(k.cp, {})[k] = v