return False
mreasons = _get_masking_status(pkg, pkgsettings, root_config)
if len(mreasons) == 1 and \
- mreasons[0].category == 'KEYWORDS' and \
- mreasons[0].message.startswith("~"):
+ mreasons[0].hint == 'unstable keyword':
return True
else:
return False
class _MaskReason(object):
- __slots__ = ('category', 'message')
+ __slots__ = ('category', 'message', 'hint')
- def __init__(self, category, message):
+ def __init__(self, category, message, hint=None):
self.category = category
self.message = message
+ self.hint = hint
def getmaskingstatus(mycpv, settings=None, portdb=None):
if settings is None:
del inc_pgroups
kmask = "missing"
+ kmask_hint = None
if '**' in pgroups:
kmask = None
break
elif gp=="~"+myarch and myarch in pgroups:
kmask="~"+myarch
+ kmask_hint = "unstable keyword"
break
try:
# Only show KEYWORDS masks for installed packages
# if they're not masked for any other reason.
if kmask and (not installed or not rValue):
- rValue.append(_MaskReason("KEYWORDS", kmask + " keyword"))
+ rValue.append(_MaskReason("KEYWORDS",
+ kmask + " keyword", hint=kmask_hint))
return rValue