Gentoo Archives: gentoo-commits

From: Fabian Groffen <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:prefix commit in: pym/_emerge/
Date: Sat, 05 Feb 2011 12:23:52
Message-Id: 50d3d61aaaf8745d1c155e7825dc182335f8c476.grobian@gentoo
1 commit: 50d3d61aaaf8745d1c155e7825dc182335f8c476
2 Author: Fabian Groffen <grobian <AT> gentoo <DOT> org>
3 AuthorDate: Sat Feb 5 12:21:10 2011 +0000
4 Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org>
5 CommitDate: Sat Feb 5 12:21:10 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=50d3d61a
7
8 binpkg: check for missing EPREFIX by absence only
9
10 Do not treat an empty prefix (the empty string) as an absent EPREFIX.
11 If people use EPREFIX='', then they should be able to use binpkgs as
12 well.
13
14 ---
15 pym/_emerge/Package.py | 2 +-
16 pym/_emerge/depgraph.py | 2 +-
17 2 files changed, 2 insertions(+), 2 deletions(-)
18
19 diff --git a/pym/_emerge/Package.py b/pym/_emerge/Package.py
20 index 98a32a6..c809337 100644
21 --- a/pym/_emerge/Package.py
22 +++ b/pym/_emerge/Package.py
23 @@ -184,7 +184,7 @@ class Package(Task):
24
25 if self.built and not self.installed:
26 # we can have an old binary which has no EPREFIX information
27 - if "EPREFIX" not in self.metadata or not self.metadata["EPREFIX"]:
28 + if "EPREFIX" not in self.metadata:
29 masks['EPREFIX.missing'] = ''
30 if len(self.metadata["EPREFIX"].strip()) < len(EPREFIX):
31 masks['EPREFIX.tooshort'] = self.metadata["EPREFIX"].strip()
32
33 diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py
34 index 17ed2d8..08a8c74 100644
35 --- a/pym/_emerge/depgraph.py
36 +++ b/pym/_emerge/depgraph.py
37 @@ -5965,7 +5965,7 @@ def _get_masking_status(pkg, pkgsettings, root_config, myrepo=None, use=None):
38 pkg.metadata["CHOST"]))
39
40 if pkg.built and not pkg.installed:
41 - if not "EPREFIX" in pkg.metadata or not pkg.metadata["EPREFIX"]:
42 + if not "EPREFIX" in pkg.metadata:
43 mreasons.append(_MaskReason("EPREFIX", "missing EPREFIX"))
44 elif len(pkg.metadata["EPREFIX"].strip()) < len(pkgsettings["EPREFIX"]):
45 mreasons.append(_MaskReason("EPREFIX", "EPREFIX: '%s' too small" % pkg.metadata["EPREFIX"]))