_get_masking_status: add _MaskReason instances iso strings
authorFabian Groffen <grobian@gentoo.org>
Wed, 2 Feb 2011 07:53:57 +0000 (08:53 +0100)
committerFabian Groffen <grobian@gentoo.org>
Wed, 2 Feb 2011 07:53:57 +0000 (08:53 +0100)
As pointed out by Zac in bug #353395, too much blind copy/paste resulted
in adding strings for Prefix errors, instead of _MaskReason instances.

pym/_emerge/depgraph.py

index 18e29996925059ff72e28fc6508e17be76f719be..7d1799a5abc785711499ebb2ba238d120b080dfb 100644 (file)
@@ -5922,9 +5922,9 @@ def _get_masking_status(pkg, pkgsettings, root_config, myrepo=None, use=None):
 
        if pkg.built and not pkg.installed:
                if not "EPREFIX" in pkg.metadata or not pkg.metadata["EPREFIX"]:
-                       mreasons.append("missing EPREFIX")
+                       mreasons.append(_MaskReason("EPREFIX", "missing EPREFIX"))
                elif len(pkg.metadata["EPREFIX"].strip()) < len(pkgsettings["EPREFIX"]):
-                       mreasons.append("EPREFIX: '%s' too small" % pkg.metadata["EPREFIX"])
+                       mreasons.append(_MaskReason("EPREFIX", "EPREFIX: '%s' too small" % pkg.metadata["EPREFIX"]))
 
        if pkg.invalid:
                for msg_type, msgs in pkg.invalid.items():