summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/_emerge/depgraph.py13
-rw-r--r--pym/portage/package/ebuild/getmaskingstatus.py18
2 files changed, 24 insertions, 7 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
index f9b581e0e..2173d1031 100644
--- a/pym/_emerge/depgraph.py
+++ b/pym/_emerge/depgraph.py
@@ -2429,7 +2429,8 @@ class depgraph(object):
root_config = self._frozen_config.roots[pkg.root]
mreasons = _get_masking_status(pkg, pkgsettings, root_config, use=self._pkg_use_enabled(pkg))
if len(mreasons) == 1 and \
- mreasons[0].hint == 'unstable keyword':
+ mreasons[0].unmask_hint and \
+ mreasons[0].unmask_hint.key == 'unstable keyword':
return True
else:
return False
@@ -5196,8 +5197,16 @@ class depgraph(object):
self._show_merge_list()
if pkg in self._dynamic_config.digraph.nodes.keys():
pkgsettings = self._frozen_config.pkgsettings[pkg.root]
+ mreasons = _get_masking_status(pkg, pkgsettings, pkg.root_config,
+ use=self._pkg_use_enabled(pkg))
+ if len(mreasons) == 1 and \
+ mreasons[0].unmask_hint and \
+ mreasons[0].unmask_hint.key == 'unstable keyword':
+ keyword = mreasons[0].unmask_hint.value
+ else:
+ keyword = '~' + pkgsettings.get('ARCH', '*')
unstable_keyword_msg.append(get_dep_chain(pkg))
- unstable_keyword_msg.append("=%s ~%s\n" % (pkg.cpv, pkgsettings["ACCEPT_KEYWORDS"]))
+ unstable_keyword_msg.append("=%s %s\n" % (pkg.cpv, keyword))
use_changes_msg = []
for pkg, needed_use_config_change in self._dynamic_config._needed_use_config_changes.items():
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