diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-01-10 07:24:46 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-01-10 07:24:46 +0000 |
commit | 143a289e23162d8331598aab8e22e6011b0274a2 (patch) | |
tree | d6614aafea589ca02d02d608e6ab7017933c4b34 | |
parent | fd5258a4cc3f7bfa4a29b0f05b9872b99654bebb (diff) | |
download | portage-143a289e23162d8331598aab8e22e6011b0274a2.tar.gz portage-143a289e23162d8331598aab8e22e6011b0274a2.tar.bz2 portage-143a289e23162d8331598aab8e22e6011b0274a2.zip |
* Enable the recursive option in profile package.use parsing.
* Enable package.umask in all the same locations as package.mask.
svn path=/main/trunk/; revision=12409
-rw-r--r-- | man/portage.5 | 1 | ||||
-rw-r--r-- | pym/portage/__init__.py | 29 |
2 files changed, 15 insertions, 15 deletions
diff --git a/man/portage.5 b/man/portage.5 index d95d28d83..3e8eb7afc 100644 --- a/man/portage.5 +++ b/man/portage.5 @@ -31,6 +31,7 @@ packages packages.build package.mask package.provided +package.unmask package.use package.use.force package.use.mask diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index f5207b8b2..bd5425d46 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -1282,9 +1282,8 @@ class config(object): del rawpusemask self.pkgprofileuse = [] - rawprofileuse = [grabdict_package( - os.path.join(x, "package.use"), juststrings=True) \ - for x in self.profiles] + rawprofileuse = [grabdict_package(os.path.join(x, "package.use"), + juststrings=True, recursive=1) for x in self.profiles] for i in xrange(len(self.profiles)): cpdict = {} for k, v in rawprofileuse[i].iteritems(): @@ -1516,17 +1515,6 @@ class config(object): self._plicensedict[cp] = cp_dict cp_dict[k] = self.expandLicenseTokens(v) - #package.unmask - pkgunmasklines = grabfile_package( - os.path.join(abs_user_config, "package.unmask"), - recursive=1) - for x in pkgunmasklines: - mycatpkg=dep_getkey(x) - if mycatpkg in self.punmaskdict: - self.punmaskdict[mycatpkg].append(x) - else: - self.punmaskdict[mycatpkg]=[x] - #getting categories from an external file now categories = [grabfile(os.path.join(x, "categories")) for x in locations] self.categories = stack_lists(categories, incremental=1) @@ -1536,12 +1524,16 @@ class config(object): archlist = stack_lists(archlist, incremental=1) self.configdict["conf"]["PORTAGE_ARCHLIST"] = " ".join(archlist) - #package.mask + # package.mask and package.unmask pkgmasklines = [] + pkgunmasklines = [] for x in pmask_locations: pkgmasklines.append(grabfile_package( os.path.join(x, "package.mask"), recursive=1)) + pkgunmasklines.append(grabfile_package( + os.path.join(x, "package.unmask"), recursive=1)) pkgmasklines = stack_lists(pkgmasklines, incremental=1) + pkgunmasklines = stack_lists(pkgunmasklines, incremental=1) self.pmaskdict = {} for x in pkgmasklines: @@ -1551,6 +1543,13 @@ class config(object): else: self.pmaskdict[mycatpkg]=[x] + for x in pkgunmasklines: + mycatpkg=dep_getkey(x) + if mycatpkg in self.punmaskdict: + self.punmaskdict[mycatpkg].append(x) + else: + self.punmaskdict[mycatpkg]=[x] + pkgprovidedlines = [grabfile(os.path.join(x, "package.provided")) for x in self.profiles] pkgprovidedlines = stack_lists(pkgprovidedlines, incremental=1) has_invalid_data = False |