From: Sebastian Luther Date: Fri, 23 Jul 2010 07:54:41 +0000 (+0200) Subject: portage.ebuild.config: Allow wildcards in atoms in user configuration X-Git-Tag: v2.2_rc68~479 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5aad2271e99bce1c30b4dce107f3d8041d6b339f;p=portage.git portage.ebuild.config: Allow wildcards in atoms in user configuration --- diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py index 4e735e35d..10c91cf6f 100644 --- a/pym/portage/package/ebuild/config.py +++ b/pym/portage/package/ebuild/config.py @@ -809,18 +809,32 @@ class config(object): pmask_locations.extend(overlay_profiles) + # 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)) + if local_config: locations.append(abs_user_config) - pmask_locations.append(abs_user_config) + + pkgmasklines.append(grabfile_package( + os.path.join(abs_user_config, "package.mask"), recursive=1, allow_wildcard=True)) + pkgunmasklines.append(grabfile_package( + os.path.join(abs_user_config, "package.unmask"), recursive=1, allow_wildcard=True)) + pusedict = grabdict_package( - os.path.join(abs_user_config, "package.use"), recursive=1) + os.path.join(abs_user_config, "package.use"), recursive=1, allow_wildcard=True) for k, v in pusedict.items(): self.pusedict.setdefault(k.cp, {})[k] = v #package.keywords pkgdict = grabdict_package( os.path.join(abs_user_config, "package.keywords"), - recursive=1) + recursive=1, allow_wildcard=True) for k, v in pkgdict.items(): # default to ~arch if no specific keyword is given if not v: @@ -838,7 +852,7 @@ class config(object): #package.license licdict = grabdict_package(os.path.join( - abs_user_config, "package.license"), recursive=1) + abs_user_config, "package.license"), recursive=1, allow_wildcard=True) for k, v in licdict.items(): cp = k.cp cp_dict = self._plicensedict.get(cp) @@ -849,7 +863,7 @@ class config(object): #package.properties propdict = grabdict_package(os.path.join( - abs_user_config, "package.properties"), recursive=1) + abs_user_config, "package.properties"), recursive=1, allow_wildcard=True) for k, v in propdict.items(): cp = k.cp cp_dict = self._ppropertiesdict.get(cp) @@ -905,14 +919,6 @@ class config(object): archlist = stack_lists(archlist, incremental=1) self.configdict["conf"]["PORTAGE_ARCHLIST"] = " ".join(archlist) - # 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)