from portage.output import bold, blue, colorize, create_color_func, darkblue, \
darkgreen, green, nc_len, red, teal, turquoise, yellow
bad = create_color_func("BAD")
+from portage.package.ebuild.getmaskingstatus import \
+ _getmaskingstatus, _MaskReason
from portage.sets import SETPREFIX
from portage.sets.base import InternalPackageSet
from portage.util import cmp_sort_key, writemsg, writemsg_stdout
print()
def get_masking_status(pkg, pkgsettings, root_config):
+ return [mreason.message for \
+ mreason in _get_masking_status(pkg, pkgsettings, root_config)]
- mreasons = portage.getmaskingstatus(
+def _get_masking_status(pkg, pkgsettings, root_config):
+
+ mreasons = _getmaskingstatus(
pkg, settings=pkgsettings,
portdb=root_config.trees["porttree"].dbapi)
if not pkg.installed:
if not pkgsettings._accept_chost(pkg.cpv, pkg.metadata):
- mreasons.append("CHOST: %s" % \
- pkg.metadata["CHOST"])
+ mreasons.append(_MaskReason("CHOST", "CHOST: %s" % \
+ pkg.metadata["CHOST"]))
if pkg.invalid:
for msg_type, msgs in pkg.invalid.items():
for msg in msgs:
- mreasons.append("invalid: %s" % (msg,))
+ mreasons.append(
+ _MaskReason("invalid", "invalid: %s" % (msg,)))
if not pkg.metadata["SLOT"]:
- mreasons.append("invalid: SLOT is undefined")
+ mreasons.append(
+ _MaskReason("invalid", "SLOT: undefined"))
return mreasons
msg.append("license(s)")
rValue.append(_MaskReason("LICENSE", " ".join(msg)))
except portage.exception.InvalidDependString as e:
- rValue.append(_MaskReason("LICENSE", "LICENSE: "+str(e)))
+ rValue.append(_MaskReason("invalid", "LICENSE: "+str(e)))
try:
missing_properties = settings._getMissingProperties(mycpv, metadata)
msg.append("properties")
rValue.append(_MaskReason("PROPERTIES", " ".join(msg)))
except portage.exception.InvalidDependString as e:
- rValue.append(_MaskReason("PROPERTIES", "PROPERTIES: "+str(e)))
+ rValue.append(_MaskReason("invalid", "PROPERTIES: "+str(e)))
# Only show KEYWORDS masks for installed packages
# if they're not masked for any other reason.