Once again throw everything to the other side. Now:
authorFabian Groffen <grobian@gentoo.org>
Sat, 21 Oct 2006 18:01:46 +0000 (18:01 -0000)
committerFabian Groffen <grobian@gentoo.org>
Sat, 21 Oct 2006 18:01:46 +0000 (18:01 -0000)
$D and $ROOT are like normal portage,
$ED and $EROOT are the prefixed versions of their non-E variants.

svn path=/main/branches/prefix/; revision=4785

39 files changed:
bin/clean_locks
bin/dispatch-conf
bin/dobin
bin/dodir
bin/dodoc
bin/doexe
bin/dohard
bin/dohtml
bin/doinfo
bin/doins
bin/dolib
bin/doman
bin/domo
bin/dosbin
bin/dosed
bin/dosym
bin/ebuild.sh
bin/env-update.sh
bin/eprefixify
bin/etc-update
bin/fix-db.py
bin/fowners
bin/fperms
bin/isolated-functions.sh
bin/misc-functions.sh
bin/pemerge.py
bin/portage_gpg_update.sh
bin/prepall
bin/prepalldocs
bin/prepallinfo
bin/prepallman
bin/prepallstrip
bin/prepinfo
bin/preplib
bin/prepman
bin/prepstrip
bin/regenworld
bin/sed
pym/portage.py

index 4e10e270b81874d0c2e0a9bb4911ec2ba2fd337e..855e9fc9443c80b29913470b9018596a798ed6d4 100755 (executable)
@@ -6,7 +6,7 @@
 import os,sys
 sys.path = ["@PORTAGE_BASE@/pym"]+sys.path
 
-import portage_locks
+import portage_locks, portage_const
 
 if not sys.argv[1:] or "--help" in sys.argv or "-h" in sys.argv:
        print
@@ -15,8 +15,8 @@ if not sys.argv[1:] or "--help" in sys.argv or "-h" in sys.argv:
        print "of the locks, even if we can't establish if they are in use."
        print "Please attempt cleaning without force first."
        print
-       print sys.argv[0]+" /usr/portage/distfiles/.locks"
-       print sys.argv[0]+" --force /usr/portage/distfiles/.locks"
+       print sys.argv[0]+" "+portage_const.EPREFIX+"/usr/portage/distfiles/.locks"
+       print sys.argv[0]+" --force "+portage_const.EPREFIX+"/usr/portage/distfiles/.locks"
        print
        sys.exit(1)
        
@@ -33,4 +33,4 @@ for x in sys.argv[1:]:
 
 
 
-       
\ No newline at end of file
+       
index 6f9c0209b15394aec713613354748b2f0e820ef0..eb18fcfc7fc73d8c65c96eb7df678cb2beed41f0 100755 (executable)
@@ -17,7 +17,7 @@ from random import *
 import atexit, commands, os, re, shutil, stat, string, sys
 sys.path = ["@PORTAGE_BASE@/pym"]+sys.path
 
-import portage, dispatch_conf
+import portage, dispatch_conf, portage_const
 
 FIND_EXTANT_CONFIGS  = "find '%s' %s -iname '._cfg????_%s'"
 DIFF_CONTENTS        = 'diff -Nu %s %s'
@@ -29,7 +29,7 @@ oldmask = os.umask(0077)
 SCRATCH_DIR = None
 while SCRATCH_DIR is None:
     try:
-        mydir = "/tmp/dispatch-conf."
+        mydir = portage_const.EPREFIX+"/var/tmp/dispatch-conf."
         for x in range(0,8):
             if int(random() * 3) == 0:
                 mydir += chr(int(65+random()*26.0))
@@ -78,7 +78,7 @@ class dispatch:
         #
 
         for path in config_paths.split ():
-            path = portage.normalize_path(path)
+            path = portage.normalize_path(portage_const.EPREFIX + path)
             try:
                 mymode = os.lstat(path).st_mode
             except OSError:
index 331cec7fe3546bc6024ec0b5299cfc388811b2a4..bb8639b3b35a6d05ee9cc4f6c43280267cc4b57d 100755 (executable)
--- a/bin/dobin
+++ b/bin/dobin
@@ -8,15 +8,15 @@ if [[ $# -lt 1 ]] ; then
        exit 1
 fi
 
-if [[ ! -d ${D}${DESTTREE}/bin ]] ; then
-       install -d "${D}${DESTTREE}/bin" || exit 2
+if [[ ! -d ${ED}${DESTTREE}/bin ]] ; then
+       install -d "${ED}${DESTTREE}/bin" || exit 2
 fi
 
 ret=0
 
 for x in "$@" ; do
        if [[ -e ${x} ]] ; then
-               install -m 0755 -o ${PORTAGE_INST_UID:-0} -g ${PORTAGE_INST_GID:-0} "${x}" "${D}${DESTTREE}/bin"
+               install -m 0755 -o ${PORTAGE_INST_UID:-0} -g ${PORTAGE_INST_GID:-0} "${x}" "${ED}${DESTTREE}/bin"
        else
                echo "!!! ${0##*/}: ${x} does not exist" 1>&2
                false
index 6c45b59c22a5c11afdaa662d6e6475876970af55..306b53e3df2f89d8255bae9985225e617ed70db4 100755 (executable)
--- a/bin/dodir
+++ b/bin/dodir
@@ -4,4 +4,4 @@
 # $Id: /var/cvsroot/gentoo-src/portage/bin/dodir,v 1.5 2004/10/04 13:56:50 vapier Exp $
 
 slash=/
-exec install -d ${DIROPTIONS} "${@/#${slash}/${D}${slash}}"
+exec install -d ${DIROPTIONS} "${@/#${slash}/${ED}${slash}}"
index 4e16b3b8069764ab2d0b36ae0d97241dd240aa5e..adbf612df2059daf5c2c9fa76645e0038b265113 100755 (executable)
--- a/bin/dodoc
+++ b/bin/dodoc
@@ -7,7 +7,7 @@ if [ $# -lt 1 ] ; then
        exit 1  
 fi
 
-dir="${D}/usr/share/doc/${PF}/${DOCDESTTREE}"
+dir="${ED}/usr/share/doc/${PF}/${DOCDESTTREE}"
 if [ ! -d "${dir}" ] ; then
        install -d "${dir}"
 fi
index e14e6d107e5ec006cd0e85ca6cd12c445c125925..8980b55e324540da001eacb9a1c5c325fcf7f8f5 100755 (executable)
--- a/bin/doexe
+++ b/bin/doexe
@@ -8,8 +8,8 @@ if [[ $# -lt 1 ]] ; then
        exit 1
 fi
 
-if [[ ! -d ${D}${EXEDESTTREE} ]] ; then
-       install -d "${D}${EXEDESTTREE}"
+if [[ ! -d ${ED}${EXEDESTTREE} ]] ; then
+       install -d "${ED}${EXEDESTTREE}"
 fi
 
 for x in "$@" ; do
@@ -22,5 +22,5 @@ for x in "$@" ; do
        else
                mysrc="${x}"
        fi
-       install ${EXEOPTIONS} "${mysrc}" "${D}${EXEDESTTREE}"
+       install ${EXEOPTIONS} "${mysrc}" "${ED}${EXEDESTTREE}"
 done
index 97c46495a12b284c8f3a41cf7438b3c01afc8b19..44b5a0ffd0552c3a2be9468e653463347f449c50 100755 (executable)
@@ -10,4 +10,4 @@ fi
 
 target=$1
 linkname=$2
-exec ln -f "${D}${target}" "${D}${linkname}"
+exec ln -f "${ED}${target}" "${ED}${linkname}"
index c6b712d4e55bd0f0858b6fc182d2464dacbcb96e..dafcef36ad8c243bcc06f5efad933c151f495809 100755 (executable)
@@ -48,9 +48,9 @@ def install(basename, dirname, options, prefix=""):
        if dirname: fullpath = dirname + "/" + fullpath
 
        if options.DOCDESTTREE:
-               destdir = options.D + "/usr/share/doc/" + options.PF + "/" + options.DOCDESTTREE + "/" + options.doc_prefix + "/" + prefix
+               destdir = options.ED + "/usr/share/doc/" + options.PF + "/" + options.DOCDESTTREE + "/" + options.doc_prefix + "/" + prefix
        else:
-               destdir = options.D + "/usr/share/doc/" + options.PF + "/html/" + options.doc_prefix + "/" + prefix
+               destdir = options.ED + "/usr/share/doc/" + options.PF + "/html/" + options.doc_prefix + "/" + prefix
 
        if os.path.isfile(fullpath):
                ext = os.path.splitext(basename)[1]
@@ -71,13 +71,13 @@ def install(basename, dirname, options, prefix=""):
 class OptionsClass:
        def __init__(self):
                self.PF = ""
-               self.D = ""
+               self.ED = ""
                self.DOCDESTTREE = ""
                
                if os.environ.has_key("PF"):
                        self.PF = os.environ["PF"]
-               if os.environ.has_key("D"):
-                       self.D = os.environ["D"]
+               if os.environ.has_key("ED"):
+                       self.D = os.environ["ED"]
                if os.environ.has_key("DOCDESTTREE"):
                        self.DOCDESTTREE = os.environ["DOCDESTTREE"]
                
index 7b7c9cd524312c2b5c33dea24822e548a285050f..0607e8c82ba16e7d5caa764089676b956c28dd16 100755 (executable)
@@ -7,14 +7,14 @@ if [ ${#} -lt 1 ] ; then
        echo "doinfo: at least one argument needed"
        exit 1  
 fi
-if [ ! -d "${D}/usr/share/info" ] ; then
-       install -d "${D}/usr/share/info"
+if [ ! -d "${ED}/usr/share/info" ] ; then
+       install -d "${ED}/usr/share/info"
 fi
 
 for x in "$@" ; do
        if [ -e "${x}" ] ; then
-               install -m 0644 "${x}" "${D}/usr/share/info"
-               gzip -f -9 "${D}/usr/share/info/${x##*/}"
+               install -m 0644 "${x}" "${ED}/usr/share/info"
+               gzip -f -9 "${ED}/usr/share/info/${x##*/}"
        else
                echo "doinfo: ${x} does not exist"
        fi
index cfcd4612ca2f6306c835a67f270fcd873aaea8ad..7df387471199877ac7761704b5a439e77a22a00c 100755 (executable)
--- a/bin/doins
+++ b/bin/doins
@@ -20,15 +20,15 @@ if [ ${INSDEPTH} -gt 30 ] ; then
        exit 1
 fi
 
-if [ "${INSDESTTREE%${D}*}" == "" ]; then
+if [ "${INSDESTTREE%${ED}*}" == "" ]; then
        echo "-------------------------------------------------------" 1>&2
-       echo "You should not use \${D} with helpers." 1>&2
+       echo "You should not use \${ED} with helpers." 1>&2
        echo "  --> ${INSDESTTREE}" 1>&2
        echo "-------------------------------------------------------" 1>&2
        #exit 1
 fi
 
-[ ! -d "${D}${INSDESTTREE}" ] && dodir "${INSDESTTREE}"
+[ ! -d "${ED}${INSDESTTREE}" ] && dodir "${INSDESTTREE}"
 
 for x in "$@" ; do
        if [ -L "$x" ] ; then
@@ -49,5 +49,5 @@ for x in "$@" ; do
        else
                mysrc="${x}"
        fi
-       install ${INSOPTIONS} "${mysrc}" "${D}${INSDESTTREE}"
+       install ${INSOPTIONS} "${mysrc}" "${ED}${INSDESTTREE}"
 done
index 38a53ae1045562a24fe3381bf39aa82227b804ac..67261a57a412c1e123713e622287ab724a1fb07c 100755 (executable)
--- a/bin/dolib
+++ b/bin/dolib
@@ -11,7 +11,7 @@ fi
 unset LIBDIR_VAR
 # we need this to default to lib so that things dont break
 CONF_LIBDIR=${CONF_LIBDIR:-lib}
-libdir="${D}${DESTTREE}/${CONF_LIBDIR}"
+libdir="${ED}${DESTTREE}/${CONF_LIBDIR}"
 
 
 if [[ $# -lt 1 ]] ; then
index dafcb6201b328b53ccdee90f92ff8d3002fb2bab..75a21affe4fdaabce9c8c5944a3c3c6ca405ca77 100755 (executable)
--- a/bin/doman
+++ b/bin/doman
@@ -33,11 +33,11 @@ for x in "$@" ; do
 
        if echo ${mandir} | @EGREP@ -q 'man[0-9n](|f|p|pm)$' -; then
                if [[ -s ${x} ]] ; then
-                       if [[ ! -d ${D}/usr/share/man/${mandir} ]] ; then
-                               install -d "${D}/usr/share/man/${mandir}"
+                       if [[ ! -d ${ED}/usr/share/man/${mandir} ]] ; then
+                               install -d "${ED}/usr/share/man/${mandir}"
                        fi
 
-                       install -m 0644 "${x}" "${D}/usr/share/man/${mandir}"
+                       install -m 0644 "${x}" "${ED}/usr/share/man/${mandir}"
                        ((ret+=$?))
                elif [[ ! -e ${x} ]] ; then
                        echo "doman: ${x} does not exist" 1>&2
index d9950e9ed144301401376af128cc1909697b2b7f..7330938ee40264a0236323db87614da74e1184ef 100755 (executable)
--- a/bin/domo
+++ b/bin/domo
@@ -8,14 +8,14 @@ if [ ${mynum} -lt 1 ] ; then
        echo "${0}: at least one argument needed"
        exit 1
 fi
-if [ ! -d "${D}${DESTTREE}/share/locale" ] ; then
-       install -d "${D}${DESTTREE}/share/locale/"
+if [ ! -d "${ED}${DESTTREE}/share/locale" ] ; then
+       install -d "${ED}${DESTTREE}/share/locale/"
 fi
 
 for x in "$@" ; do
        if [ -e "${x}" ] ; then
                mytiny="${x##*/}"
-               mydir="${D}${DESTTREE}/share/locale/${mytiny%.*}/LC_MESSAGES"
+               mydir="${ED}${DESTTREE}/share/locale/${mytiny%.*}/LC_MESSAGES"
                if [ ! -d "${mydir}" ] ; then
                        install -d "${mydir}"
                fi
index 46c1ce2f47f39e0ece66d1cf4610cd4e976db3f5..c1a9ad6419d399dabe3d1bfa8f5720fa324dff6f 100755 (executable)
@@ -8,15 +8,15 @@ if [[ $# -lt 1 ]] ; then
        exit 1
 fi
 
-if [[ ! -d ${D}${DESTTREE}/sbin ]] ; then
-       install -d "${D}${DESTTREE}/sbin" || exit 2
+if [[ ! -d ${ED}${DESTTREE}/sbin ]] ; then
+       install -d "${ED}${DESTTREE}/sbin" || exit 2
 fi
 
 ret=0
 
 for x in "$@" ; do
        if [[ -e ${x} ]] ; then
-               install -m 0755 -o ${PORTAGE_INST_UID:-0} -g ${PORTAGE_INST_GID:-0} "${x}" "${D}${DESTTREE}/sbin"
+               install -m 0755 -o ${PORTAGE_INST_UID:-0} -g ${PORTAGE_INST_GID:-0} "${x}" "${ED}${DESTTREE}/sbin"
        else
                echo "!!! ${0##*/}: ${x} does not exist" 1>&2
                false
index 4118226dbf54a9277b5449b34f304306a2080e77..484a380541080318c63fe65820d718706eaceb71 100755 (executable)
--- a/bin/dosed
+++ b/bin/dosed
@@ -3,10 +3,10 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Id: /var/cvsroot/gentoo-src/portage/bin/dosed,v 1.7 2004/10/04 13:56:50 vapier Exp $
 
-mysed="s:${D}::g"
+mysed="s:${ED}::g"
 
 for x in "$@" ; do
-       y="${D}${x}"
+       y="${ED}${x}"
        if [ -e "${y}" ] ; then
                if [ -f "${y}" ] ; then
                        sed -i -e "${mysed}" "${y}"
index 48276f49d169eadf13d52fd090a05706b3d9057d..9b84e4630e9cbac4bde0112f7df74df6df2bb096 100755 (executable)
--- a/bin/dosym
+++ b/bin/dosym
@@ -11,5 +11,5 @@ fi
 target="${1}"
 linkname="${2}"
 [[ ${target:0:1} == "/" ]] && target="${EPREFIX}${target}"
-exec ln -snf "${target}" "${D}/${linkname}"
+exec ln -snf "${target}" "${ED}/${linkname}"
 
index 392bb14d545ff556bbc3dfa94a79caaae42bfb0c..072a7e1694cbfd5012cf2fe0b23950d7ab3bd8e0 100755 (executable)
@@ -483,10 +483,10 @@ keepdir() {
        local x
        if [ "$1" == "-R" ] || [ "$1" == "-r" ]; then
                shift
-               find "$@" -type d -printf "${D}/%p/.keep_${CATEGORY}_${PN}-${SLOT}\n" | tr "\n" "\0" | $XARGS -0 -n100 touch || die "Failed to recursive create .keep files"
+               find "$@" -type d -printf "${ED}/%p/.keep_${CATEGORY}_${PN}-${SLOT}\n" | tr "\n" "\0" | $XARGS -0 -n100 touch || die "Failed to recursive create .keep files"
        else
                for x in "$@"; do
-                       touch "${D}/${x}/.keep_${CATEGORY}_${PN}-${SLOT}" || die "Failed to create .keep in ${D}/${x}"
+                       touch "${ED}/${x}/.keep_${CATEGORY}_${PN}-${SLOT}" || die "Failed to create .keep in ${ED}/${x}"
                done
        fi
 }
@@ -663,24 +663,24 @@ econf() {
                fi
 
                vecho ${CONFCACHE} ${CONFCACHE_ARG} ${TMP_CONFCACHE_DIR} "${ECONF_SOURCE}/configure" \
-                       --prefix=${EPREFIX}/usr \
+                       --prefix="${EPREFIX}"/usr \
                        --host=${CHOST} \
-                       --mandir=${EPREFIX}/usr/share/man \
-                       --infodir=${EPREFIX}/usr/share/info \
-                       --datadir=${EPREFIX}/usr/share \
-                       --sysconfdir=${EPREFIX}/etc \
-                       --localstatedir=${EPREFIX}/var/lib \
+                       --mandir="${EPREFIX}"/usr/share/man \
+                       --infodir="${EPREFIX}"/usr/share/info \
+                       --datadir="${EPREFIX}"/usr/share \
+                       --sysconfdir="${EPREFIX}"/etc \
+                       --localstatedir="${EPREFIX}"/var/lib \
                        "$@" \
                        ${LOCAL_EXTRA_ECONF}
 
                if ! ${CONFCACHE} ${CONFCACHE_ARG} ${TMP_CONFCACHE_DIR} "${ECONF_SOURCE}/configure" \
-                       --prefix=${EPREFIX}/usr \
-                       --host=${CHOST} \
-                       --mandir=${EPREFIX}/usr/share/man \
-                       --infodir=${EPREFIX}/usr/share/info \
-                       --datadir=${EPREFIX}/usr/share \
-                       --sysconfdir=${EPREFIX}/etc \
-                       --localstatedir=${EPREFIX}/var/lib \
+                       --prefix="${EPREFIX}"/usr \
+                       --host="${CHOST}" \
+                       --mandir="${EPREFIX}"/usr/share/man \
+                       --infodir="${EPREFIX}"/usr/share/info \
+                       --datadir="${EPREFIX}"/usr/share \
+                       --sysconfdir="${EPREFIX}"/etc \
+                       --localstatedir="${EPREFIX}"/var/lib \
                        "$@"  \
                        ${LOCAL_EXTRA_ECONF}; then
 
@@ -712,21 +712,21 @@ einstall() {
 
        if [ -f ./[mM]akefile -o -f ./GNUmakefile ] ; then
                if [ "${PORTAGE_DEBUG}" == "1" ]; then
-                       make -n prefix="${D}/usr" \
-                               datadir="${D}/usr/share" \
-                               infodir="${D}/usr/share/info" \
-                               localstatedir="${D}/var/lib" \
-                               mandir="${D}/usr/share/man" \
-                               sysconfdir="${D}/etc" \
+                       make -n prefix="${ED}/usr" \
+                               datadir="${ED}/usr/share" \
+                               infodir="${ED}/usr/share/info" \
+                               localstatedir="${ED}/var/lib" \
+                               mandir="${ED}/usr/share/man" \
+                               sysconfdir="${ED}/etc" \
                                ${EXTRA_EINSTALL} \
                                "$@" install
                fi
-               make prefix="${D}/usr" \
-                       datadir="${D}/usr/share" \
-                       infodir="${D}/usr/share/info" \
-                       localstatedir="${D}/var/lib" \
-                       mandir="${D}/usr/share/man" \
-                       sysconfdir="${D}/etc" \
+               make prefix="${ED}/usr" \
+                       datadir="${ED}/usr/share" \
+                       infodir="${ED}/usr/share/info" \
+                       localstatedir="${ED}/var/lib" \
+                       mandir="${ED}/usr/share/man" \
+                       sysconfdir="${ED}/etc" \
                        ${EXTRA_EINSTALL} \
                        "$@" install || die "einstall failed"
        else
@@ -780,9 +780,9 @@ src_test() {
 }
 
 src_install() {
-       # this avoids misc errors in prefix because it doesn't exist in
+       # this avoids misc errors in prefix because it doesn't exist
        # by default
-       mkdir -p "${D}"
+       mkdir -p "${ED}"
        return
 }
 
@@ -809,7 +809,7 @@ pkg_config() {
 # Used to generate the /lib/cpp and /usr/bin/cc wrappers
 gen_wrapper() {
        cat > "$1" <<-EOF
-       #!/bin/sh
+       #!${EPREFIX}/bin/sh
        exec $2 "\$@"
        EOF
        chmod 0755 "$1"
@@ -920,8 +920,8 @@ into() {
                export DESTTREE=""
        else
                export DESTTREE=$1
-               if [ ! -d "${D}${DESTTREE}" ]; then
-                       install -d "${D}${DESTTREE}"
+               if [ ! -d "${ED}${DESTTREE}" ]; then
+                       install -d "${ED}${DESTTREE}"
                fi
        fi
 }
@@ -931,8 +931,8 @@ insinto() {
                export INSDESTTREE=""
        else
                export INSDESTTREE=$1
-               if [ ! -d "${D}${INSDESTTREE}" ]; then
-                       install -d "${D}${INSDESTTREE}"
+               if [ ! -d "${ED}${INSDESTTREE}" ]; then
+                       install -d "${ED}${INSDESTTREE}"
                fi
        fi
 }
@@ -942,8 +942,8 @@ exeinto() {
                export EXEDESTTREE=""
        else
                export EXEDESTTREE="$1"
-               if [ ! -d "${D}${EXEDESTTREE}" ]; then
-                       install -d "${D}${EXEDESTTREE}"
+               if [ ! -d "${ED}${EXEDESTTREE}" ]; then
+                       install -d "${ED}${EXEDESTTREE}"
                fi
        fi
 }
@@ -953,8 +953,8 @@ docinto() {
                export DOCDESTTREE=""
        else
                export DOCDESTTREE="$1"
-               if [ ! -d "${D}usr/share/doc/${PF}/${DOCDESTTREE}" ]; then
-                       install -d "${D}usr/share/doc/${PF}/${DOCDESTTREE}"
+               if [ ! -d "${ED}usr/share/doc/${PF}/${DOCDESTTREE}" ]; then
+                       install -d "${ED}usr/share/doc/${PF}/${DOCDESTTREE}"
                fi
        fi
 }
@@ -1082,9 +1082,9 @@ dyn_compile() {
                srcdir=${S}
                cd "${S}"
        fi
-       #our custom version of libtool uses $S and $D to fix
+       #our custom version of libtool uses $S and $ED to fix
        #invalid paths in .la files
-       export S D
+       export S ED
        #some packages use an alternative to $S to build in, cause
        #our libtool to create problematic .la files
        export PWORKDIR="$WORKDIR"
@@ -1167,16 +1167,16 @@ dyn_install() {
                cd "${S}"
        fi
        vecho
-       vecho ">>> Install ${PF} into ${D} category ${CATEGORY}"
-       #our custom version of libtool uses $S and $D to fix
+       vecho ">>> Install ${PF} into ${ED} category ${CATEGORY}"
+       #our custom version of libtool uses $S and $ED to fix
        #invalid paths in .la files
-       export S D
+       export S ED
        #some packages uses an alternative to $S to build in, cause
        #our libtool to create problematic .la files
        export PWORKDIR="$WORKDIR"
        src_install
        touch "${PORTAGE_BUILDDIR}/.installed"
-       vecho ">>> Completed installing ${PF} into ${D}"
+       vecho ">>> Completed installing ${PF} into ${ED}"
        vecho
        cd ${PORTAGE_BUILDDIR}
        [ "$(type -t post_src_install)" == "function" ] && post_src_install
index 6966a12268a8e199eded3e3c481b20fd1c4ff102..7822821ddf96fc7cb39d9bc219718539899216a3 100755 (executable)
@@ -22,7 +22,7 @@ fi
 export ROOT="${ROOT:=/}"
 [[ ${ROOT} == */ ]] || export ROOT="${ROOT}/"
 
-export ENVDIR="${ROOT}etc/env.d"
+export ENVDIR="${EROOT}etc/env.d"
 mkdir -p ${ENVDIR}
 chmod 755 ${ENVDIR}
 specials="
@@ -33,13 +33,13 @@ colon_separated="
        ADA_INCLUDE_PATH ADA_OBJECTS_PATH LDPATH PATH MANPATH ROOTPATH
        PRELINK_PATH PRELINK_PATH_MASK PYTHON_PATH"
 
-export LDSOCONF="${ROOT}etc/ld.so.conf"
+export LDSOCONF="${EROOT}etc/ld.so.conf"
 
-export PRELINKCONF="${ROOT}etc/prelink.conf"
+export PRELINKCONF="${EROOT}etc/prelink.conf"
 defaultprelinkpaths=":/bin:/sbin:/usr/bin:/usr/sbin:/lib:/usr/lib"
 
-export PROFILEENV="${ROOT}etc/profile.env"
-export CSHENV="${ROOT}etc/csh.env"
+export PROFILEENV="${EROOT}etc/profile.env"
+export CSHENV="${EROOT}etc/csh.env"
 
 # make sure we aren't tricked with previous 'my_envd_' variables
 unset $(set | grep '^my_envd_' | cut -d= -f1)
@@ -195,11 +195,11 @@ unset my_envd_LDPATH
 # RUN EXTERNAL PROGRAMS NOW
 ############################################
 
-echo ">>> Regenerating ${ROOT}etc/ld.so.cache..."
+echo ">>> Regenerating ${EROOT}etc/ld.so.cache..."
 if [[ ${MAKELINKS} -eq 0 ]] ; then
-       (cd / ; ${EPREFIX}/sbin/ldconfig -X -r ${ROOT} >& /dev/null)
+       (cd / ; ${EPREFIX}/sbin/ldconfig -X -r ${EROOT} >& /dev/null)
 else
-       (cd / ; ${EPREFIX}/sbin/ldconfig -r ${ROOT} >& /dev/null)
+       (cd / ; ${EPREFIX}/sbin/ldconfig -r ${EROOT} >& /dev/null)
 fi
 
 cat << EOF > ${PROFILEENV}
index cacc9970056140bd1ddba13b036cde3d73876911..92da93981b8d9c85ec09d9d7760d5881e1fe209b 100755 (executable)
@@ -3,6 +3,7 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Id: $
 
+# Fabian Groffen <grobian@gentoo.org>
 # replaces @GENTOO_PORTAGE_EPREFIX@ with EPREFIX for the given files
 
 if [[ $# -lt 1 ]] ; then
index 7258467f12ef708802c481dbc9aad55bc699313d..e4778a044f7e90b4d9e71431b10cd9dfcb56152b 100755 (executable)
@@ -43,7 +43,7 @@ function scan() {
        fi
 
        for path in ${CONFIG_PROTECT} ; do
-               path="${ROOT}${EPREFIX}/${path}"
+               path="${EROOT}/${path}"
                find_opts="-iname ._cfg????_*"
                if [ ! -d "${path}" ]; then
                        [ ! -f "${path}" ] && continue
@@ -60,7 +60,7 @@ function scan() {
                        rpath=$(echo "${file/\/\///}" | sed -e "s:/[^/]*$::")
                        rfile=$(echo "${file/\/\///}" | sed -e "s:^.*/::")
                        for mpath in ${CONFIG_PROTECT_MASK}; do
-                               mpath="${ROOT}${path}"
+                               mpath="${EROOT}${mpath}"
                                if [[ "${rpath}" == "${mpath}"* ]]; then
                                        mv ${rpath}/${rfile} ${rpath}/${rfile:10}
                                        break
@@ -438,7 +438,8 @@ trap die term
 
 
 eval $(@PORTAGE_BASE@/bin/portageq envvar -v CONFIG_PROTECT \
-       CONFIG_PROTECT_MASK PORTAGE_CONFIGROOT PORTAGE_TMPDIR ROOT EPREFIX)
+       CONFIG_PROTECT_MASK PORTAGE_CONFIGROOT PORTAGE_TMPDIR ROOT \
+       EROOT EPREFIX)
 export PORTAGE_TMPDIR
 
 # quick hack to get prefix support in
index 92e9f4e5d1b7b3ed510539a9cb9569e59129bc68..34a422e9168cd268973fc6b58a8bebc6a5e6cbe0 100755 (executable)
@@ -9,9 +9,10 @@ sys.path = ["@PORTAGE_BASE@/pym"]+sys.path
 from stat import *
 from output import *
 from portage import lockfile,unlockfile,VDB_PATH,root
+import portage_const
 
 
-mylog = open("/var/log/emerge_fix-db.log", "a")
+mylog = open(portage_const.EPREFIX+"/var/log/emerge_fix-db.log", "a")
 def writemsg(msg):
        if msg[-1] != '\n':
                msg += "\n"
@@ -21,7 +22,7 @@ def writemsg(msg):
        mylog.flush()
 
 def fix_global_counter(value):
-       myf = open("/var/cache/edb/counter")
+       myf = open(portage_const.EPREFIX+"/var/cache/edb/counter")
        newvalue = value+1000
        myf.write(str(newvalue))
        myf.flush()
@@ -33,7 +34,7 @@ counters = {}
 times = {}
 
 try:
-       real_counter = long(open("/var/cache/edb/counter").read())
+       real_counter = long(open(portage_const.EPREFIX+"/var/cache/edb/counter").read())
 except SystemExit, e:
        raise  # This needs to be propogated
 except:
@@ -157,19 +158,3 @@ else:
        #writemsg("Run with '--fix' to attempt automatic correction.")
        pass
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
index 1919340a10d952cd515f6083bfdf95c053af950e..1ebdce4500453a745e3c892f5728e303cc56de6f 100755 (executable)
@@ -4,4 +4,4 @@
 # $Id: fowners 1912 2005-08-25 03:54:42Z ferringb $
 
 slash=/
-exec chown "${@/#${slash}/${D}${slash}}"
+exec chown "${@/#${slash}/${ED}${slash}}"
index f243249828cd4b824ff018dcca3bedbc135d6b85..cccd218b3d4d561bddb9ac7d444365f5002123fc 100755 (executable)
@@ -4,4 +4,4 @@
 # $Id: fperms 1912 2005-08-25 03:54:42Z ferringb $
 
 slash=/
-exec chmod "${@/#${slash}/${D}${slash}}"
+exec chmod "${@/#${slash}/${ED}${slash}}"
index de62d8611a549b6df13b618da80ca09edbecfcd3..e487a9aff26f09e2cc47ef1de944369cc1388874 100644 (file)
@@ -35,6 +35,8 @@ elog() {
 }
 
 esyslog() {
+       # not prefixed yet as I don't know if it's possible to have a logger
+       # inside the prefix at all
        local pri=
        local tag=
 
index 7ba0a6ef66c8af1d3c4f658fc5011848aeb371d4..b8120cce67b1ad9644e03ad94c4e5aaba241f788 100644 (file)
@@ -17,26 +17,26 @@ shift $#
 source @PORTAGE_BASE@/bin/ebuild.sh
 
 install_qa_check() {
-       cd "${D}" || die "cd failed"
+       cd "${ED}" || die "cd failed"
        prepall
 
        declare -i UNSAFE=0
-       for i in $(find "${D}/" -type f -perm -2002); do
+       for i in $(find "${ED}/" -type f -perm -2002); do
                ((UNSAFE++))
                vecho "UNSAFE SetGID: $i"
                chmod -s,o-w "$i"
        done
-       for i in $(find "${D}/" -type f -perm -4002); do
+       for i in $(find "${ED}/" -type f -perm -4002); do
                ((UNSAFE++))
                vecho "UNSAFE SetUID: $i"
                chmod -s,o-w "$i"
        done
 
        # Now we look for all world writable files.
-       for i in $(find "${D}/" -type f -perm -2); do
+       for i in $(find "${ED}/" -type f -perm -2); do
                vecho -ne '\a'
                vecho "QA Security Notice:"
-               vecho "- ${i:${#D}:${#i}} will be a world writable file."
+               vecho "- ${i:${#ED}:${#i}} will be a world writable file."
                vecho "- This may or may not be a security problem, most of the time it is one."
                vecho "- Please double check that $PF really needs a world writeable bit and file bugs accordingly."
                sleep 1
@@ -54,7 +54,7 @@ install_qa_check() {
                # Don't want paths that point to the tree where the package was built
                # (older, broken libtools would do this).  Also check for null paths
                # because the loader will search $PWD when it finds null paths.
-               f=$(scanelf -qyRF '%r %p' "${D}" | grep -E "(${PORTAGE_BUILDDIR}|: |::|^:|^ )")
+               f=$(scanelf -qyRF '%r %p' "${ED}" | grep -E "(${PORTAGE_BUILDDIR}|: |::|^:|^ )")
                if [[ -n ${f} ]] ; then
                        vecho -ne '\a\n'
                        vecho "QA Notice: the following files contain insecure RUNPATH's"
@@ -71,7 +71,7 @@ install_qa_check() {
                fi
 
                # Check for setid binaries but are not built with BIND_NOW
-               f=$(scanelf -qyRF '%b %p' "${D}")
+               f=$(scanelf -qyRF '%b %p' "${ED}")
                if [[ -n ${f} ]] ; then
                        vecho -ne '\a\n'
                        vecho "QA Notice: the following files are setXid, dyn linked, and using lazy bindings"
@@ -93,7 +93,7 @@ install_qa_check() {
                [[ -n ${!qa_var} ]] && QA_TEXTRELS=${!qa_var}
                [[ -n ${QA_STRICT_TEXTRELS} ]] && QA_TEXTRELS=""
                export QA_TEXTRELS
-               f=$(scanelf -qyRF '%t %p' "${D}" | grep -v 'usr/lib/debug/')
+               f=$(scanelf -qyRF '%t %p' "${ED}" | grep -v 'usr/lib/debug/')
                if [[ -n ${f} ]] ; then
                        scanelf -qyRF '%T %p' "${PORTAGE_BUILDDIR}"/ &> "${T}"/scanelf-textrel.log
                        vecho -ne '\a\n'
@@ -133,7 +133,7 @@ install_qa_check() {
                                        [[ -n ${!qa_var} ]] && QA_WX_LOAD=${!qa_var}
                                        [[ -n ${QA_STRICT_WX_LOAD} ]] && QA_WX_LOAD=""
                                        export QA_EXECSTACK QA_WX_LOAD
-                                       f=$(scanelf -qyRF '%e %p' "${D}" | grep -v 'usr/lib/debug/')
+                                       f=$(scanelf -qyRF '%e %p' "${ED}" | grep -v 'usr/lib/debug/')
                                        ;;
                        esac
                        ;;
@@ -156,7 +156,7 @@ install_qa_check() {
                fi
 
                # Save NEEDED information
-               scanelf -qyRF '%p %n' "${D}" | sed -e 's:^:/:' > "${PORTAGE_BUILDDIR}"/build-info/NEEDED
+               scanelf -qyRF '%p %n' "${ED}" | sed -e 's:^:/:' > "${PORTAGE_BUILDDIR}"/build-info/NEEDED
 
                if [[ ${insecure_rpath} -eq 1 ]] ; then
                        die "Aborting due to serious QA concerns with RUNPATH/RPATH"
@@ -171,29 +171,29 @@ install_qa_check() {
                die "There are ${UNSAFE} unsafe files. Portage will not install them."
        fi
 
-       if [[ -d ${D}/${D} ]] ; then
+       if [[ -d ${ED}/${ED} ]] ; then
                declare -i INSTALLTOD=0
-               for i in $(find "${D}/${D}/"); do
-                       echo "QA Notice: /${i##${D}/${D}} installed in \${D}/\${D}"
+               for i in $(find "${ED}/${ED}/"); do
+                       echo "QA Notice: /${i##${ED}/${ED}} installed in \${ED}/\${ED}"
                        ((INSTALLTOD++))
                done
-               die "Aborting due to QA concerns: ${INSTALLTOD} files installed in ${D}/${D}"
+               die "Aborting due to QA concerns: ${INSTALLTOD} files installed in ${ED}/${ED}"
                unset INSTALLTOD
        fi
 
-       if [[ -d ${D}/${EPREFIX} ]] ; then
+       if [[ -d ${ED}/${EPREFIX} ]] ; then
                declare -i INSTALLTOD=0
-               for i in $(find "${D}/${EPREFIX}/") ; do
-                       echo "QA Notice: ${i#${D}} double prefix"
+               for i in $(find "${ED}/${EPREFIX}/") ; do
+                       echo "QA Notice: ${i#${ED}} double prefix"
                        ((INSTALLTOD++))
                done
                die "Aborting due to QA concerns: ${INSTALLTOD} double prefix files installed"
                unset INSTALLTOD
        fi
 
-       if [[ -d ${EDEST} ]] ; then
+       if [[ -d ${D} ]] ; then
                declare -i INSTALLTOD=0
-               for i in $(find ${EDEST%/} | sed -e "s|^${EDEST%/}||g") ; do
+               for i in $(find ${D%/} | sed -e "s|^${D%/}||g") ; do
                        if [[ ${#EPREFIX} -gt ${#i} && ${EPREFIX:0:${#i}} != ${i} ]] ; then
                                echo "QA Notice: ${i} outside of prefix"
                                ((INSTALLTOD++))
@@ -207,19 +207,19 @@ install_qa_check() {
        fi
 
        local find_log="${T}/find-portage-log"
-       find "${D}"/ -user ${PORTAGE_USER:-portage} -print0 > "${find_log}"
+       find "${ED}"/ -user ${PORTAGE_USER:-portage} -print0 > "${find_log}"
        if [[ -s ${find_log} ]] ; then
                xargs -0 chown -h ${PORTAGE_INST_UID:-0} < "${find_log}"
        fi
-       find "${D}"/ -group ${PORTAGE_GROUP:-portage} -print0 > "${find_log}"
+       find "${ED}"/ -group ${PORTAGE_GROUP:-portage} -print0 > "${find_log}"
        if [[ -s ${find_log} ]] ; then
                xargs -0 chgrp -h ${PORTAGE_INST_GID:-0} < "${find_log}"
        fi
        rm -f "${find_log}"
 
        # Portage regenerates this on the installed system.
-       if [ -f "${D}/usr/share/info/dir.gz" ]; then
-               rm -f "${D}/usr/share/info/dir.gz"
+       if [ -f "${ED}/usr/share/info/dir.gz" ]; then
+               rm -f "${ED}/usr/share/info/dir.gz"
        fi
 
        if hasq multilib-strict ${FEATURES} && [ -x file -a -x find -a \
@@ -227,15 +227,15 @@ install_qa_check() {
                local abort=no firstrun=yes
                MULTILIB_STRICT_EXEMPT=$(echo ${MULTILIB_STRICT_EXEMPT} | sed -e 's:\([(|)]\):\\\1:g')
                for dir in ${MULTILIB_STRICT_DIRS}; do
-                       [ -d "${D}/${dir}" ] || continue
-                       for file in $(find ${D}/${dir} -type f | grep -v "^${D}/${dir}/${MULTILIB_STRICT_EXEMPT}"); do
+                       [ -d "${ED}/${dir}" ] || continue
+                       for file in $(find ${ED}/${dir} -type f | grep -v "^${ED}/${dir}/${MULTILIB_STRICT_EXEMPT}"); do
                                if file ${file} | egrep -q "${MULTILIB_STRICT_DENY}" ; then
                                        if [[ ${firstrun} == yes ]] ; then
                                                echo "Files matching a file type that is not allowed:"
                                                firstrun=no
                                        fi
                                        abort=yes
-                                       echo "   ${file#${D}//}"
+                                       echo "   ${file#${ED}//}"
                                fi
                        done
                done
@@ -388,7 +388,7 @@ dyn_package() {
        tar ${tar_options} -cf - . | bzip2 -f > "${pkg_tmp}" || \
                die "Failed to create tarball"
        cd ..
-       export PYTHONPATH=${PORTAGE_PYM_PATH:-/usr/lib/portage/pym}
+       export PYTHONPATH=${PORTAGE_PYM_PATH:-${EPREFIX}/usr/lib/portage/pym}
        python -c "import xpak; t=xpak.tbz2('${pkg_tmp}'); t.recompose('${PORTAGE_BUILDDIR}/build-info')"
        if [ $? -ne 0 ]; then
                rm -f "${pkg_tmp}"
index 08de6eda3bf10cd63f5907143f88a1fdbaaefe81..d0e150ea44628af32f38509de15f2eb3dc569bb1 100755 (executable)
@@ -1,7 +1,7 @@
-#!/usr/bin/python -O
+#!@PYTHON@ -O
 
 import profile,time,sys,os
-sys.path = ["/usr/lib/portage/bin","/usr/lib/portage/pym"]+sys.path
+sys.path = ["@PORTAGE_BASE@/bin","@PORTAGE_BASE@/pym"]+sys.path
 
 def clock():
        return time.time()
@@ -9,7 +9,7 @@ profile.time.clock = clock
 
 profile.run("import emerge", os.getcwd()+"/prof")
 
-class StatsProcesser:
+ class StatsProcesser:
        def __init__(self, stats):
                self.output = []
                self.last = ""
index 7d526c231f94f9c0c2318a4a88754ce9c0cb2e47..79786a3aeb21ba73568a2b67ea8f941e9c3680b0 100755 (executable)
@@ -3,4 +3,4 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Id: /var/cvsroot/gentoo-src/portage/bin/portage_gpg_update.sh,v 1.2 2004/10/04 13:56:50 vapier Exp $
 
-wget -O - http://www.gentoo.org/proj/en/devrel/roll-call/userinfo.xml | sed 's:.*\(0x[0-9a-fA-F]\+\)[^0-9a-fA-F].*:\1:gp;d' | xargs gpg -vvv --no-default-keyring  --no-permission-warning --homedir /usr/portage/metadata --keyring "gentoo.gpg" --keyserver subkeys.pgp.net --recv-keys &> gpg.log
+wget -O - http://www.gentoo.org/proj/en/devrel/roll-call/userinfo.xml | sed 's:.*\(0x[0-9a-fA-F]\+\)[^0-9a-fA-F].*:\1:gp;d' | xargs gpg -vvv --no-default-keyring  --no-permission-warning --homedir "${EPREFIX}"/usr/portage/metadata --keyring "gentoo.gpg" --keyserver subkeys.pgp.net --recv-keys &> gpg.log
index 2602e2959c461bcdab208fdea0d0543982484615..4ff190dd0aa1b40f0839f5d84e14be55fcf114a8 100755 (executable)
@@ -9,17 +9,17 @@ prepallstrip
 
 # this should help to ensure that all (most?) shared libraries are executable
 # and that all libtool scripts / static libraries are not executable
-for i in "${D}"/opt/*/lib{,32,64} \
-         "${D}"/lib{,32,64}       \
-         "${D}"/usr/lib{,32,64}   \
-         "${D}"/usr/X11R6/lib{,32,64} ; do
+for i in "${ED}"/opt/*/lib{,32,64} \
+         "${ED}"/lib{,32,64}       \
+         "${ED}"/usr/lib{,32,64}   \
+         "${ED}"/usr/X11R6/lib{,32,64} ; do
        [[ ! -d ${i} ]] && continue
 
        for j in "${i}"/*.so.* "${i}"/*.so ; do
                [[ ! -e ${j} ]] && continue
                [[ -L ${j} ]] && continue
                [[ -x ${j} ]] && continue
-               echo "making executable: /${j/${D}/}"
+               echo "making executable: /${j/${ED}/}"
                chmod +x "${j}"
        done
 
@@ -27,7 +27,7 @@ for i in "${D}"/opt/*/lib{,32,64} \
                [[ ! -e ${j} ]] && continue
                [[ -L ${j} ]] && continue
                [[ ! -x ${j} ]] && continue
-               echo "removing executable bit: /${j/${D}/}"
+               echo "removing executable bit: /${j/${ED}/}"
                chmod -x "${j}"
        done
 done
@@ -36,7 +36,7 @@ done
 # /lib, we have to make sure we have a linker script in /usr/lib along side 
 # the static library, or gcc will utilize the static lib when linking :(.
 # http://bugs.gentoo.org/4411
-for a in "${D}"/usr/lib*/*.a ; do
+for a in "${ED}"/usr/lib*/*.a ; do
        s=${a%.a}.so
        if [[ ! -e ${s} ]] ; then
                s=${s%usr/*}${s##*/usr/}
@@ -48,7 +48,7 @@ for a in "${D}"/usr/lib*/*.a ; do
 done
 
 # Make sure people don't store libtool files or static libs in /lib
-f=$(ls "${D}"/lib*/*.{a,la} 2>/dev/null)
+f=$(ls "${ED}"/lib*/*.{a,la} 2>/dev/null)
 if [[ -n ${f} ]] ; then
        echo -e "\n\aQA Notice: excessive files found in the / partition\a"
        echo "${f}"
@@ -56,9 +56,9 @@ if [[ -n ${f} ]] ; then
 fi
 
 # Verify that the libtool files don't contain bogus $D entries.
-for a in "${D}"/usr/lib*/*.la ; do
+for a in "${ED}"/usr/lib*/*.la ; do
        s=${a##*/}
-       if grep -qs "${D}" "${a}" ; then
+       if grep -qs "${ED}" "${a}" ; then
                echo -e "\n\aQA Notice: ${s} appears to contain PORTAGE_TMPDIR paths\a"
                sleep 1
        fi
@@ -67,7 +67,7 @@ done
 if type -p scanelf > /dev/null ; then
 
 # Run some sanity checks on shared libraries
-for d in "${D}"/lib* "${D}"/usr/lib* ; do
+for d in "${ED}"/lib* "${ED}"/usr/lib* ; do
        f=$(scanelf -ByF '%S %p' "${d}"/lib*.so* | gawk '$2 == "" { print }')
        if [[ -n ${f} ]] ; then
                echo -e "\n\aQA Notice: the following shared libraries lack a SONAME\a"
index 3a881de6d0417e1dd7196602a8480bbe3e8058e5..b592058f64de09d8e2f3c7e09de24e36b119263c 100755 (executable)
@@ -3,7 +3,7 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Id: /var/cvsroot/gentoo-src/portage/bin/prepalldocs,v 1.6 2004/10/04 13:56:50 vapier Exp $
 
-z="`find "${D}"/usr/share/doc \( -type f -or -type l \) -not -name "*.gz" -not -name "*.js" 2>/dev/null`"
+z="`find "${ED}"/usr/share/doc \( -type f -or -type l \) -not -name "*.gz" -not -name "*.js" 2>/dev/null`"
 
 for y in ${z} ; do
        if [ -L "${y}" ] ; then
index f7787ea7ac171fc7778af5d2581c3d6858ab75e1..01e022d8e8808e6098d77f2bc7a1b6b14c28832b 100755 (executable)
@@ -3,7 +3,7 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Id: /var/cvsroot/gentoo-src/portage/bin/prepallinfo,v 1.6 2004/10/04 13:56:50 vapier Exp $
 
-[[ ! -d ${D}/usr/share/info ]] && exit 0
+[[ ! -d ${ED}/usr/share/info ]] && exit 0
 
 echo "info:"
 exec prepinfo
index c9857d328860a5a24337df0a182fe794b5e05096..cfbd076194a6b94b6e405b98f258c21d9572449d 100755 (executable)
@@ -6,9 +6,9 @@
 ret=0
 
 echo "man:"
-for x in "${D}"/opt/*/man "${D}"/usr/share/man "${D}"/usr/local/man "${D}"/usr/X11R6/man ; do
+for x in "${ED}"/opt/*/man "${ED}"/usr/share/man "${ED}"/usr/local/man "${ED}"/usr/X11R6/man ; do
        if [[ -d ${x} ]] ; then
-               x=${x#${D}}
+               x=${x#${ED}}
                x=${x%/man}
                prepman "${x}"
                ((ret+=$?))
index 3a89b96ff5dcf7d978e6c3fb11751bcd7b7f6554..9a012e03fd75e0e0b71f3d6e89edf9242da36be6 100755 (executable)
@@ -3,4 +3,4 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Id: /var/cvsroot/gentoo-src/portage/bin/prepallstrip,v 1.12 2004/10/04 13:56:50 vapier Exp $
 
-exec prepstrip "${D}"
+exec prepstrip "${ED}"
index a414f58ec97eaf7569cf9330f527bee24b8e7fe1..b203eaa5173b818206b2178772b817e095a4c761 100755 (executable)
@@ -4,12 +4,12 @@
 # $Id: /var/cvsroot/gentoo-src/portage/bin/prepinfo,v 1.6.2.1 2005/05/29 12:40:08 jstubbs Exp $
 
 if [ -z "$1" ] ; then
-       z="${D}/usr/share/info"
+       z="${ED}/usr/share/info"
 else
-       if [ -d "${D}$1/share/info" ] ; then
-               z="${D}$1/share/info"
+       if [ -d "${ED}$1/share/info" ] ; then
+               z="${ED}$1/share/info"
        else
-               z="${D}$1/info"
+               z="${ED}$1/info"
        fi
 fi
 
index cceab2bec870236c84872f9c3f6f7d82b981480c..280d1b56689fc55fcb089567cb132fc66b61921c 100755 (executable)
@@ -17,9 +17,9 @@ if [ -z "${CONF_LIBDIR}" ]; then
 fi
 
 if [ -z "$1" ] ; then
-       z="${D}/usr/${CONF_LIBDIR}"
+       z="${ED}/usr/${CONF_LIBDIR}"
 else
-       z="${D}$1/${CONF_LIBDIR}"
+       z="${ED}$1/${CONF_LIBDIR}"
 fi
 
 if [ -d "${z}" ] ; then
index 6197b2211be3e3833b562b0b0a10dc6c95feafc4..263782c6118a0a49802146bfb34104561d112f65 100755 (executable)
@@ -4,13 +4,13 @@
 # $Id: /var/cvsroot/gentoo-src/portage/bin/prepman,v 1.10.2.3 2005/05/29 12:40:08 jstubbs Exp $
 
 if [[ -z $1 ]] ; then 
-       z="${D}/usr/share/man"
+       z="${ED}/usr/share/man"
 else
-       z="${D}$1/man"
+       z="${ED}$1/man"
 fi
 
 if [[ ! -d ${z} ]] ; then
-       echo "QA Notice: prepman called with non-existent dir '${z#${D}}'" 2>&1
+       echo "QA Notice: prepman called with non-existent dir '${z#${ED}}'" 2>&1
        exit 0
 fi
 
index d5cf0bc827e4851e47622d0944333aad6758d0d2..372ff1b0ed59672d8fcae1e6023dc7a89c3583c8 100755 (executable)
@@ -24,16 +24,16 @@ banner=1
 
 save_elf_debug() {
        local x=$1
-       local y="${D}usr/lib/debug/${x:${#D}}.debug"
+       local y="${ED}usr/lib/debug/${x:${#ED}}.debug"
 
        if hasq installsources ${FEATURES} && [ -x "${EPREFIX}"/usr/bin/debugedit ] ; then
                local sources_dir=/usr/src/debug/${CATEGORY}/${PF}
                debugedit -b "${WORKDIR}" -d "${EPREFIX}/${sources_dir}" \
                        -l "${T}"/debug.sources "${x}"
                if [[ -s ${T}/debug.sources ]] ; then 
-                       [[ -d ${D}${sources_dir} ]] || mkdir -p "${D}${sources_dir}"
+                       [[ -d ${ED}${sources_dir} ]] || mkdir -p "${ED}${sources_dir}"
                        cat "${T}"/debug.sources | (cd "${WORKDIR}"; LANG=C sort -z -u | \
-                               rsync -aL0 --files-from=- "${WORKDIR}/" "${D}${sources_dir}/" )
+                               rsync -aL0 --files-from=- "${WORKDIR}/" "${ED}${sources_dir}/" )
                fi
        fi
 
@@ -81,12 +81,12 @@ for x in $(scanelf -yqRBF '#k%F' -k '.symtab' "$@") $(for y in "$@"; do find "${
        set +o noglob
 
        if [[ ${f} == *"current ar archive"* ]] ; then
-               vecho "   ${x:${#D}}"
+               vecho "   ${x:${#ED}}"
                [[ -n ${NOSTRIP} ]] && continue
                [[ ${stripitbaby} -eq 1 ]] && ${STRIP} -g "${x}"
        fi
        if [[ ${f} == *"SB executable"* || ${f} == *"SB shared object"* ]] ; then
-               vecho "   ${x:${#D}}"
+               vecho "   ${x:${#ED}}"
                save_elf_debug "${x}"
                [[ -n ${NOSTRIP} ]] && continue
                [[ ${stripitbaby} -eq 1 ]] && ${STRIP} ${PORTAGE_STRIP_FLAGS} "${x}"
index 803de9171e0ac9b47b718b92edca28b46b9f10d0..e8f4f0d5e9596223e508cc4944accf5919fc1a66 100755 (executable)
@@ -6,7 +6,7 @@
 import sys
 sys.path.insert(0, "@PORTAGE_BASE@/pym")
 import os
-import portage, string, re
+import portage, string, re, portage_const
 
 __candidatematcher__ = re.compile("^[0-9]+: \\*\\*\\* emerge ")
 __noncandidatematcher__ = re.compile(" sync( |$)| clean( |$)| search( |$)|--oneshot|--fetchonly| unmerge( |$)")
@@ -48,7 +48,7 @@ worldlist = portage.grabfile(os.path.join("/", portage.WORLD_FILE))
 syslist = portage.settings.packages
 syslist = filter(issyspkg, syslist)
 
-logfile = portage.grabfile("/var/log/emerge.log")
+logfile = portage.grabfile(portage_const.EPREFIX+"/var/log/emerge.log")
 biglist = filter(iscandidate, logfile)
 biglist = map(getpkginfo, biglist)
 tmplist = []
diff --git a/bin/sed b/bin/sed
index d4b1d87b2abe173d7e674c949f6eec152add1cb7..6996b43a0be167e37643a87410e4cd91e89cdb1a 100755 (executable)
--- a/bin/sed
+++ b/bin/sed
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!@BASH@
 # Copyright 2006 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
  
index b32025939e6da6ead120a72ecc50bf44914193eb..9ec4863bc9e2dd42d1b0b7361b74d5e5e7d4aa4a 100644 (file)
@@ -2593,7 +2593,7 @@ def doebuild_environment(myebuild, mydo, myroot, mysettings, debug, use_cache, m
 
        mysettings["EPREFIX"]  = portage_const.EPREFIX.rstrip(os.sep)
        mysettings["ROOT"]     = myroot
-       mysettings["PROOT"]    = normalize_path(myroot + mysettings["EPREFIX"]) + os.sep
+       mysettings["EROOT"]    = normalize_path(myroot + mysettings["EPREFIX"]) + os.sep
        mysettings["STARTDIR"] = getcwd()
 
        mysettings["EBUILD"]   = ebuild_path
@@ -2655,8 +2655,8 @@ def doebuild_environment(myebuild, mydo, myroot, mysettings, debug, use_cache, m
 
        mysettings["HOME"] = os.path.join(mysettings["PORTAGE_BUILDDIR"], "homedir")
        mysettings["WORKDIR"] = os.path.join(mysettings["PORTAGE_BUILDDIR"], "work")
-       mysettings["EDEST"] = os.path.join(mysettings["PORTAGE_BUILDDIR"], "image") + os.sep
-       mysettings["D"] = os.path.join(mysettings["PORTAGE_BUILDDIR"], "image" + mysettings["EPREFIX"]) + os.sep
+       mysettings["D"] = os.path.join(mysettings["PORTAGE_BUILDDIR"], "image") + os.sep
+       mysettings["ED"] = os.path.join(mysettings["PORTAGE_BUILDDIR"], "image" + mysettings["EPREFIX"]) + os.sep
        mysettings["T"] = os.path.join(mysettings["PORTAGE_BUILDDIR"], "temp")
 
        mysettings["PORTAGE_BASHRC"] = os.path.join(