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
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():
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:
break
elif gp=="~"+myarch and myarch in pgroups:
kmask="~"+myarch
- kmask_hint = "unstable keyword"
+ kmask_hint = _UnmaskHint("unstable keyword", kmask)
break
try:
# 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