binpkg: check for missing EPREFIX by absence only
authorFabian Groffen <grobian@gentoo.org>
Sat, 5 Feb 2011 12:21:10 +0000 (13:21 +0100)
committerFabian Groffen <grobian@gentoo.org>
Sat, 5 Feb 2011 12:21:10 +0000 (13:21 +0100)
Do not treat an empty prefix (the empty string) as an absent EPREFIX.
If people use EPREFIX='', then they should be able to use binpkgs as
well.

pym/_emerge/Package.py
pym/_emerge/depgraph.py

index 98a32a69c75611df7c43b8e50e56fe998809e691..c809337d8bb4441a7bffe5a382c04e8066b1dc75 100644 (file)
@@ -184,7 +184,7 @@ class Package(Task):
 
                if self.built and not self.installed:
                        # we can have an old binary which has no EPREFIX information
-                       if "EPREFIX" not in self.metadata or not self.metadata["EPREFIX"]:
+                       if "EPREFIX" not in self.metadata:
                                masks['EPREFIX.missing'] = ''
                        if len(self.metadata["EPREFIX"].strip()) < len(EPREFIX):
                                masks['EPREFIX.tooshort'] = self.metadata["EPREFIX"].strip()
index 17ed2d81e58cfe69cb126fbd7beccf295b62d246..08a8c743e016ece040605952175535f1c0f21d3a 100644 (file)
@@ -5965,7 +5965,7 @@ def _get_masking_status(pkg, pkgsettings, root_config, myrepo=None, use=None):
                                pkg.metadata["CHOST"]))
 
        if pkg.built and not pkg.installed:
-               if not "EPREFIX" in pkg.metadata or not pkg.metadata["EPREFIX"]:
+               if not "EPREFIX" in pkg.metadata:
                        mreasons.append(_MaskReason("EPREFIX", "missing EPREFIX"))
                elif len(pkg.metadata["EPREFIX"].strip()) < len(pkgsettings["EPREFIX"]):
                        mreasons.append(_MaskReason("EPREFIX", "EPREFIX: '%s' too small" % pkg.metadata["EPREFIX"]))