diff options
Diffstat (limited to 'pym/portage/package/ebuild/_config/MaskManager.py')
-rw-r--r-- | pym/portage/package/ebuild/_config/MaskManager.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/pym/portage/package/ebuild/_config/MaskManager.py b/pym/portage/package/ebuild/_config/MaskManager.py index f5b240a47..c06e34663 100644 --- a/pym/portage/package/ebuild/_config/MaskManager.py +++ b/pym/portage/package/ebuild/_config/MaskManager.py @@ -7,7 +7,7 @@ __all__ = ( from itertools import chain from portage import os -from portage.dep import ExtendedAtomDict, match_from_list +from portage.dep import ExtendedAtomDict, match_from_list, _repo_separator, _slot_separator from portage.util import grabfile_package, stack_lists from portage.versions import cpv_getkey @@ -61,10 +61,10 @@ class MaskManager(object): if user_config: user_pkgmasklines = grabfile_package( os.path.join(abs_user_config, "package.mask"), recursive=1, \ - allow_wildcard=True, remember_source_file=True, verify_eapi=False) + allow_wildcard=True, allow_repo=True, remember_source_file=True, verify_eapi=False) user_pkgunmasklines = grabfile_package( os.path.join(abs_user_config, "package.unmask"), recursive=1, \ - allow_wildcard=True, remember_source_file=True, verify_eapi=False) + allow_wildcard=True, allow_repo=True, remember_source_file=True, verify_eapi=False) #Stack everything together. At this point, only user_pkgmasklines may contain -atoms. #Don't warn for unmatched -atoms here, since we don't do it for any other user config file. @@ -83,7 +83,7 @@ class MaskManager(object): for k, v in d.items(): d[k] = tuple(v) - def getMaskAtom(self, cpv, slot): + def getMaskAtom(self, cpv, slot, repo): """ Take a package and return a matching package.mask atom, or None if no such atom exists or it has been cancelled by package.unmask. PROVIDE @@ -100,7 +100,10 @@ class MaskManager(object): cp = cpv_getkey(cpv) mask_atoms = self._pmaskdict.get(cp) if mask_atoms: - pkg_list = ["%s:%s" % (cpv, slot)] + pkg = "".join((cpv, _slot_separator, slot)) + if repo: + pkg = "".join((pkg, _repo_separator, repo)) + pkg_list = [pkg] unmask_atoms = self._punmaskdict.get(cp) for x in mask_atoms: if not match_from_list(x, pkg_list): |