aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-08-23 10:38:49 -0700
committerZac Medico <zmedico@gentoo.org>2010-08-23 10:38:49 -0700
commitd8baf4d71a1cb54749b2d0ea2e55ea8adb4bd50f (patch)
tree65e585e3f70ede3f7daa35a28f26b12b1363a652 /pym/portage/package/ebuild/getmaskingstatus.py
parentuse_reduce: Give a hint to IUSE in the 'use flag '%s' is not referencable in ... (diff)
downloadportage-d8baf4d71a1cb54749b2d0ea2e55ea8adb4bd50f.tar.gz
portage-d8baf4d71a1cb54749b2d0ea2e55ea8adb4bd50f.tar.bz2
portage-d8baf4d71a1cb54749b2d0ea2e55ea8adb4bd50f.zip
Pass a keyword hint from getmaskingstatus() to the autounmask code.
Diffstat (limited to 'pym/portage/package/ebuild/getmaskingstatus.py')
-rw-r--r--pym/portage/package/ebuild/getmaskingstatus.py18
1 files changed, 13 insertions, 5 deletions
diff --git a/pym/portage/package/ebuild/getmaskingstatus.py b/pym/portage/package/ebuild/getmaskingstatus.py
index 5b2090186..a09aa33dd 100644
--- a/pym/portage/package/ebuild/getmaskingstatus.py
+++ b/pym/portage/package/ebuild/getmaskingstatus.py
@@ -15,14 +15,22 @@ from portage.versions import catpkgsplit, cpv_getkey
if sys.hexversion >= 0x3000000:
basestring = str
+class _UnmaskHint(object):
+
+ __slots__ = ('key', 'value')
+
+ def __init__(self, key, value):
+ self.key = key
+ self.value = value
+
class _MaskReason(object):
- __slots__ = ('category', 'message', 'hint')
+ __slots__ = ('category', 'message', 'unmask_hint')
- def __init__(self, category, message, hint=None):
+ def __init__(self, category, message, unmask_hint=None):
self.category = category
self.message = message
- self.hint = hint
+ self.unmask_hint = unmask_hint
def getmaskingstatus(mycpv, settings=None, portdb=None):
if settings is None:
@@ -135,7 +143,7 @@ def _getmaskingstatus(mycpv, settings, portdb):
break
elif gp=="~"+myarch and myarch in pgroups:
kmask="~"+myarch
- kmask_hint = "unstable keyword"
+ kmask_hint = _UnmaskHint("unstable keyword", kmask)
break
try:
@@ -170,6 +178,6 @@ def _getmaskingstatus(mycpv, settings, portdb):
# if they're not masked for any other reason.
if kmask and (not installed or not rValue):
rValue.append(_MaskReason("KEYWORDS",
- kmask + " keyword", hint=kmask_hint))
+ kmask + " keyword", unmask_hint=kmask_hint))
return rValue