diff options
Diffstat (limited to 'pym/portage/package/ebuild/_config/MaskManager.py')
-rw-r--r-- | pym/portage/package/ebuild/_config/MaskManager.py | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/pym/portage/package/ebuild/_config/MaskManager.py b/pym/portage/package/ebuild/_config/MaskManager.py index 25d679e9f..66278ec5e 100644 --- a/pym/portage/package/ebuild/_config/MaskManager.py +++ b/pym/portage/package/ebuild/_config/MaskManager.py @@ -135,3 +135,31 @@ class MaskManager(object): return None return x return None + + def getRawMaskAtom(self, cpv, slot, repo): + """ + Take a package and return a matching package.mask atom, or None if no + such atom exists. It HAS NOT! been cancelled by any package.unmask. + PROVIDE is not checked, so atoms will not be found for old-style + virtuals. + + @param cpv: The package name + @type cpv: String + @param slot: The package's slot + @type slot: String + @rtype: String + @return: A matching atom string or None if one is not found. + """ + + cp = cpv_getkey(cpv) + mask_atoms = self._pmaskdict.get(cp) + if mask_atoms: + pkg = "".join((cpv, _slot_separator, slot)) + if repo: + pkg = "".join((pkg, _repo_separator, repo)) + pkg_list = [pkg] + for x in mask_atoms: + if not match_from_list(x, pkg_list): + continue + return x + return None |