From: Sebastian Luther Date: Fri, 23 Jul 2010 10:26:13 +0000 (+0200) Subject: Make atoms with wildcards work in package.mask and package.unmask X-Git-Tag: v2.2_rc68~476 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ecf43a2bb0fbed01c55d809a422bd6e70f708670;p=portage.git Make atoms with wildcards work in package.mask and package.unmask --- diff --git a/pym/portage/package/ebuild/config.py b/pym/portage/package/ebuild/config.py index 9e55cc883..3ba8cc311 100644 --- a/pym/portage/package/ebuild/config.py +++ b/pym/portage/package/ebuild/config.py @@ -1714,10 +1714,19 @@ class config(object): """ cp = cpv_getkey(cpv) - mask_atoms = self.pmaskdict.get(cp) + c, p = catsplit(cp) + mask_atoms = [] + mask_atoms.extend(self.pmaskdict.get("*/*", [])) + mask_atoms.extend(self.pmaskdict.get(c+"/*", [])) + mask_atoms.extend(self.pmaskdict.get("*/"+p, [])) + mask_atoms.extend(self.pmaskdict.get(cp, [])) if mask_atoms: pkg_list = ["%s:%s" % (cpv, metadata["SLOT"])] - unmask_atoms = self.punmaskdict.get(cp) + unmask_atoms = [] + unmask_atoms.extend(self.punmaskdict.get("*/*", [])) + unmask_atoms.extend(self.punmaskdict.get(c+"/*", [])) + unmask_atoms.extend(self.punmaskdict.get("*/"+p, [])) + unmask_atoms.extend(self.punmaskdict.get(cp, [])) for x in mask_atoms: if not match_from_list(x, pkg_list): continue