From 8061322d92b1b57442fdef00baf323fae62ce5f1 Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Mon, 27 Aug 2007 20:44:19 +0000 Subject: [PATCH] Add EPREFIX as env setting, such that we can retrieve it as file from the binary package. If it's absent, abort mission. Drop EAPI check, as that should be dealt with in other code already. (But having an EPREFIX file implicitly says we have EAPI=prefix anyway...) svn path=/main/branches/prefix/; revision=7708 --- bin/ebuild.sh | 2 +- pym/portage/__init__.py | 18 +++++++----------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/bin/ebuild.sh b/bin/ebuild.sh index d46a48caa..f3fe9914a 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -937,7 +937,7 @@ dyn_compile() { CXXFLAGS DEPEND EXTRA_ECONF EXTRA_EINSTALL EXTRA_MAKE \ FEATURES INHERITED IUSE LDFLAGS LIBCFLAGS LIBCXXFLAGS \ LICENSE PDEPEND PF PKGUSE PROVIDE RDEPEND RESTRICT SLOT \ - KEYWORDS HOMEPAGE SRC_URI DESCRIPTION; do + KEYWORDS HOMEPAGE SRC_URI DESCRIPTION EAPI; do [ -n "${!f}" ] && echo $(echo "${!f}" | tr '\n,\r,\t' ' , , ' | sed s/' \+'/' '/g) > ${f} done echo "${USE}" > USE diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index cd1ff69aa..1019af21e 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -5137,14 +5137,15 @@ def pkgmerge(mytbz2, myroot, mysettings, mydbapi=None, vartree=None, prev_mtimes return 1 mycat = mycat.strip() - eapi = xptbz2.getfile("EAPI") - if not eapi: - writemsg("!!! EAPI info missing from info chunk, aborting...\n", + buildprefix = xptbz2.getfile("EPREFIX") + if not buildprefix: + writemsg("!!! EPREFIX info missing from info chunk, this is a non-prefix package, aborting...\n", noiselevel=-1) return 1 - elif eapi.strip() != portage.const.EAPI: - writemsg("!!! EAPI mismatch, got: %s, supported: %s\n" % - (eapi.strip(), portage.const.EAPI), noiselevel=-1) + buildprefix = buildprefix.strip() + if len(buildprefix) < len(EPREFIX): + writemsg("!!! Unsuitable binary package, prefix absent or length is too small for this system\n", + noiselevel=-1) return 1 # These are the same directories that would be used at build time. @@ -5186,11 +5187,6 @@ def pkgmerge(mytbz2, myroot, mysettings, mydbapi=None, vartree=None, prev_mtimes debug = mysettings.get("PORTAGE_DEBUG", "") == "1" # We want to install in "our" prefix, not the binary one - buildprefix = mysettings.get("EPREFIX", "") - if len(buildprefix) < len(EPREFIX): - writemsg("!!! Unsuitable binary package, prefix absent or length is too small for this system\n", - noiselevel=-1) - return 1 mysettings["EPREFIX"] = EPREFIX # Let's assure that what we dump into our system has also a -- 2.26.2