From 50d3d61aaaf8745d1c155e7825dc182335f8c476 Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Sat, 5 Feb 2011 13:21:10 +0100 Subject: [PATCH] binpkg: check for missing EPREFIX by absence only 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 | 2 +- pym/_emerge/depgraph.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pym/_emerge/Package.py b/pym/_emerge/Package.py index 98a32a69c..c809337d8 100644 --- a/pym/_emerge/Package.py +++ b/pym/_emerge/Package.py @@ -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() diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index 17ed2d81e..08a8c743e 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -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"])) -- 2.26.2