Add EPREFIX as env setting, such that we can retrieve it as file from
authorFabian Groffen <grobian@gentoo.org>
Mon, 27 Aug 2007 20:44:19 +0000 (20:44 -0000)
committerFabian Groffen <grobian@gentoo.org>
Mon, 27 Aug 2007 20:44:19 +0000 (20:44 -0000)
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
pym/portage/__init__.py

index d46a48caaedc714a55cc310d379d930140ac2e61..f3fe9914aa62d02ed8661441b64b7bb0d8e1c0f8 100755 (executable)
@@ -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
index cd1ff69aa48c5a5dafcc8e0b5f1cdf22c3329e2f..1019af21e9067d06c79d8d2ce1c261c705fc840d 100644 (file)
@@ -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