forward port r15024
authorFabian Groffen <grobian@gentoo.org>
Thu, 10 Dec 2009 19:14:07 +0000 (19:14 -0000)
committerFabian Groffen <grobian@gentoo.org>
Thu, 10 Dec 2009 19:14:07 +0000 (19:14 -0000)
svn path=/main/branches/prefix/; revision=15027

bin/ebuild.sh
man/ebuild.5
pym/portage/__init__.py

index 59def7e78ec1e4d9fab1bffe33dfb82579249eda..7b33dda8a80cb42b06b05351d3963cacb3ba3032 100755 (executable)
@@ -1606,11 +1606,10 @@ READONLY_EBUILD_METADATA="DEFINED_PHASES DEPEND DESCRIPTION
        PDEPEND PROVIDE RDEPEND RESTRICT SLOT SRC_URI"
 
 READONLY_PORTAGE_VARS="D EBUILD EBUILD_PHASE \
-       EBUILD_SH_ARGS EMERGE_FROM FILESDIR PORTAGE_BINPKG_FILE \
-       PORTAGE_BIN_PATH PORTAGE_IUSE \
+       EBUILD_SH_ARGS ED EMERGE_FROM EROOT FILESDIR \
+       PORTAGE_BINPKG_FILE PORTAGE_BIN_PATH PORTAGE_IUSE \
        PORTAGE_PYM_PATH PORTAGE_MUTABLE_FILTERED_VARS \
-       PORTAGE_SAVED_READONLY_VARS PORTAGE_TMPDIR T WORKDIR \
-       ED EROOT"
+       PORTAGE_SAVED_READONLY_VARS PORTAGE_TMPDIR T WORKDIR"
 
 PORTAGE_SAVED_READONLY_VARS="A CATEGORY P PF PN PR PV PVR"
 
index d69a18d3bd63921555f5aeace4f1f5d9fb08f654..a229bf90ae9cb2ca836db0bd00612fc43a4d0c56 100644 (file)
@@ -15,7 +15,7 @@ Here's a simple example ebuild:
 
 .DS
 .nf
-# Copyright 1999\-2007 Gentoo Foundation
+# Copyright 1999\-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Header: $
 
@@ -105,8 +105,9 @@ location in the portage tree.  Do not modify this variable.
 .B EPREFIX
 Contains the offset that this Portage was configured for during
 installation.  The offset is sometimes necessary in an ebuild or eclass,
-and is available in such cases as ${EPREFIX}.  Do not modify this
-variable.
+and is available in such cases as ${EPREFIX}.  EPREFIX does not contain
+a trailing slash, therefore an absent offset is represented by the empty
+string.  Do not modify this variable.
 .TP
 \fBS\fR = \fI"${WORKDIR}/${P}"\fR
 Contains the path to the temporary \fIbuild directory\fR.  This variable
@@ -118,13 +119,15 @@ be modified to match the extraction directory of a tarball for the package.
 Contains the path to a \fItemporary directory\fR.  You may use this for
 whatever you like.
 .TP
-\fBD\fR = \fI"${PORTAGE_TMPDIR}/portage/${CATEGORY}/${PF}/image"\fR
+\fBD\fR = \fI"${PORTAGE_TMPDIR}/portage/${CATEGORY}/${PF}/image/"\fR
 Contains the path to the temporary \fIinstall directory\fR.  Every write
 operation that does not involve the helper tools and functions (found below)
-should be prefixed with ${D}.  Do not modify this variable.
+should be prefixed with ${D}.  Often the offset prefix needs to be taken
+into account here, for which the variable ${ED} is provided (see below).
+Do not modify this variable.
 .TP
-\fBED\fT = \fI"${PORTAGE_TMPDIR}/portage/${CATEGORY}/${PF}/image/${EPREFIX}"\fR
-Contains the path "${D}${EPREFIX}" for convenience purposes.  Do not
+\fBED\fT = \fI"${PORTAGE_TMPDIR}/portage/${CATEGORY}/${PF}/image/${EPREFIX}/"\fR
+Contains the path "${D%/}${EPREFIX}/" for convenience purposes.  Do not
 modify this variable.
 .TP
 .B PORTAGE_LOG_FILE
@@ -134,10 +137,12 @@ Contains the path of the build log. If \fBPORT_LOGDIR\fR variable is unset then
 \fBROOT\fR = \fI"/"\fR
 Contains the path that portage should use as the root of the live filesystem.
 When packages wish to make changes to the live filesystem, they should do so in
-the tree prefixed by ${ROOT}.  Do not modify this variable.
+the tree prefixed by ${ROOT}.  Often the offset prefix needs to be taken
+into account here, for which the variable ${EROOT} is provided (see
+below).  Do not modify this variable.
 .TP
-\fBEROOT\fR = \fI"${ROOT}${EPREFIX%/}"\fR
-Contains "${ROOT}${EPREFIX%/}" for convenience purposes.  Do not modify
+\fBEROOT\fR = \fI"${ROOT%/}${EPREFIX}/"\fR
+Contains "${ROOT%/}${EPREFIX}/" for convenience purposes.  Do not modify
 this variable.
 .TP
 \fBDESCRIPTION\fR = \fI"A happy little package"\fR
index 79b4b63862272cbad365422b3080892d093f7f12..9eccf5c33adef2f97f144787b61729ad13b4388a 100644 (file)
@@ -1386,12 +1386,13 @@ class config(object):
 
        _env_blacklist = [
                "A", "AA", "CATEGORY", "DEPEND", "DESCRIPTION", "EAPI",
-               "EBUILD_PHASE", "EMERGE_FROM", "HOMEPAGE", "INHERITED", "IUSE",
+               "EBUILD_PHASE", "EMERGE_FROM", "EPREFIX", "EROOT",
+               "HOMEPAGE", "INHERITED", "IUSE",
                "KEYWORDS", "LICENSE", "PDEPEND", "PF", "PKGUSE",
                "PORTAGE_CONFIGROOT", "PORTAGE_IUSE",
                "PORTAGE_NONFATAL", "PORTAGE_REPO_NAME",
                "PORTAGE_USE", "PROPERTIES", "PROVIDE", "RDEPEND", "RESTRICT",
-               "ROOT", "SLOT", "SRC_URI", "EPREFIX", "EROOT"
+               "ROOT", "SLOT", "SRC_URI"
        ]
 
        _environ_whitelist = []
@@ -1408,7 +1409,8 @@ class config(object):
                "ACCEPT_LICENSE", "BASH_ENV", "BUILD_PREFIX", "D",
                "DISTDIR", "DOC_SYMLINKS_DIR", "EBUILD",
                "EBUILD_EXIT_STATUS_FILE", "EBUILD_FORCE_TEST",
-               "EBUILD_PHASE", "ECLASSDIR", "ECLASS_DEPTH", "EMERGE_FROM",
+               "EBUILD_PHASE", "ECLASSDIR", "ECLASS_DEPTH", "ED",
+               "EMERGE_FROM", "EPREFIX", "EROOT",
                "FEATURES", "FILESDIR", "HOME", "NOCOLOR", "PATH",
                "PKGDIR",
                "PKGUSE", "PKG_LOGDIR", "PKG_TMPDIR",
@@ -1430,8 +1432,7 @@ class config(object):
                "ROOT", "ROOTPATH", "STARTDIR", "T", "TMP", "TMPDIR",
                "USE_EXPAND", "USE_ORDER", "WORKDIR",
                "XARGS",
-               "BPREFIX", "DEFAULT_PATH", "ED", "EPREFIX", "EROOT",
-               "PORTAGE_GROUP", "PORTAGE_USER",
+               "BPREFIX", "DEFAULT_PATH", "PORTAGE_GROUP", "PORTAGE_USER"
        ]
 
        # user config variables