From: Fabian Groffen Date: Sat, 21 Oct 2006 18:01:46 +0000 (-0000) Subject: Once again throw everything to the other side. Now: X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=2ae183411d4c831dc50d614e7281e59b56c08ae8;p=portage.git Once again throw everything to the other side. Now: $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 --- diff --git a/bin/clean_locks b/bin/clean_locks index 4e10e270b..855e9fc94 100755 --- a/bin/clean_locks +++ b/bin/clean_locks @@ -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 + diff --git a/bin/dispatch-conf b/bin/dispatch-conf index 6f9c0209b..eb18fcfc7 100755 --- a/bin/dispatch-conf +++ b/bin/dispatch-conf @@ -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: diff --git a/bin/dobin b/bin/dobin index 331cec7fe..bb8639b3b 100755 --- 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 diff --git a/bin/dodir b/bin/dodir index 6c45b59c2..306b53e3d 100755 --- 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}}" diff --git a/bin/dodoc b/bin/dodoc index 4e16b3b80..adbf612df 100755 --- 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 diff --git a/bin/doexe b/bin/doexe index e14e6d107..8980b55e3 100755 --- 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 diff --git a/bin/dohard b/bin/dohard index 97c46495a..44b5a0ffd 100755 --- a/bin/dohard +++ b/bin/dohard @@ -10,4 +10,4 @@ fi target=$1 linkname=$2 -exec ln -f "${D}${target}" "${D}${linkname}" +exec ln -f "${ED}${target}" "${ED}${linkname}" diff --git a/bin/dohtml b/bin/dohtml index c6b712d4e..dafcef36a 100755 --- a/bin/dohtml +++ b/bin/dohtml @@ -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"] diff --git a/bin/doinfo b/bin/doinfo index 7b7c9cd52..0607e8c82 100755 --- a/bin/doinfo +++ b/bin/doinfo @@ -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 diff --git a/bin/doins b/bin/doins index cfcd4612c..7df387471 100755 --- 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 diff --git a/bin/dolib b/bin/dolib index 38a53ae10..67261a57a 100755 --- 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 diff --git a/bin/doman b/bin/doman index dafcb6201..75a21affe 100755 --- 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 diff --git a/bin/domo b/bin/domo index d9950e9ed..7330938ee 100755 --- 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 diff --git a/bin/dosbin b/bin/dosbin index 46c1ce2f4..c1a9ad641 100755 --- a/bin/dosbin +++ b/bin/dosbin @@ -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 diff --git a/bin/dosed b/bin/dosed index 4118226db..484a38054 100755 --- 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}" diff --git a/bin/dosym b/bin/dosym index 48276f49d..9b84e4630 100755 --- 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}" diff --git a/bin/ebuild.sh b/bin/ebuild.sh index 392bb14d5..072a7e169 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -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 diff --git a/bin/env-update.sh b/bin/env-update.sh index 6966a1226..7822821dd 100755 --- a/bin/env-update.sh +++ b/bin/env-update.sh @@ -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} diff --git a/bin/eprefixify b/bin/eprefixify index cacc99700..92da93981 100755 --- a/bin/eprefixify +++ b/bin/eprefixify @@ -3,6 +3,7 @@ # Distributed under the terms of the GNU General Public License v2 # $Id: $ +# Fabian Groffen # replaces @GENTOO_PORTAGE_EPREFIX@ with EPREFIX for the given files if [[ $# -lt 1 ]] ; then diff --git a/bin/etc-update b/bin/etc-update index 7258467f1..e4778a044 100755 --- a/bin/etc-update +++ b/bin/etc-update @@ -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 diff --git a/bin/fix-db.py b/bin/fix-db.py index 92e9f4e5d..34a422e91 100755 --- a/bin/fix-db.py +++ b/bin/fix-db.py @@ -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 - - - - - - - - - - - - - - - - diff --git a/bin/fowners b/bin/fowners index 1919340a1..1ebdce450 100755 --- a/bin/fowners +++ b/bin/fowners @@ -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}}" diff --git a/bin/fperms b/bin/fperms index f24324982..cccd218b3 100755 --- a/bin/fperms +++ b/bin/fperms @@ -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}}" diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh index de62d8611..e487a9aff 100644 --- a/bin/isolated-functions.sh +++ b/bin/isolated-functions.sh @@ -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= diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh index 7ba0a6ef6..b8120cce6 100644 --- a/bin/misc-functions.sh +++ b/bin/misc-functions.sh @@ -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}" diff --git a/bin/pemerge.py b/bin/pemerge.py index 08de6eda3..d0e150ea4 100755 --- a/bin/pemerge.py +++ b/bin/pemerge.py @@ -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 = "" diff --git a/bin/portage_gpg_update.sh b/bin/portage_gpg_update.sh index 7d526c231..79786a3ae 100755 --- a/bin/portage_gpg_update.sh +++ b/bin/portage_gpg_update.sh @@ -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 diff --git a/bin/prepall b/bin/prepall index 2602e2959..4ff190dd0 100755 --- a/bin/prepall +++ b/bin/prepall @@ -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" diff --git a/bin/prepalldocs b/bin/prepalldocs index 3a881de6d..b592058f6 100755 --- a/bin/prepalldocs +++ b/bin/prepalldocs @@ -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 diff --git a/bin/prepallinfo b/bin/prepallinfo index f7787ea7a..01e022d8e 100755 --- a/bin/prepallinfo +++ b/bin/prepallinfo @@ -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 diff --git a/bin/prepallman b/bin/prepallman index c9857d328..cfbd07619 100755 --- a/bin/prepallman +++ b/bin/prepallman @@ -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+=$?)) diff --git a/bin/prepallstrip b/bin/prepallstrip index 3a89b96ff..9a012e03f 100755 --- a/bin/prepallstrip +++ b/bin/prepallstrip @@ -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}" diff --git a/bin/prepinfo b/bin/prepinfo index a414f58ec..b203eaa51 100755 --- a/bin/prepinfo +++ b/bin/prepinfo @@ -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 diff --git a/bin/preplib b/bin/preplib index cceab2bec..280d1b566 100755 --- a/bin/preplib +++ b/bin/preplib @@ -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 diff --git a/bin/prepman b/bin/prepman index 6197b2211..263782c61 100755 --- a/bin/prepman +++ b/bin/prepman @@ -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 diff --git a/bin/prepstrip b/bin/prepstrip index d5cf0bc82..372ff1b0e 100755 --- a/bin/prepstrip +++ b/bin/prepstrip @@ -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}" diff --git a/bin/regenworld b/bin/regenworld index 803de9171..e8f4f0d5e 100755 --- a/bin/regenworld +++ b/bin/regenworld @@ -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 d4b1d87b2..6996b43a0 100755 --- 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 diff --git a/pym/portage.py b/pym/portage.py index b32025939..9ec4863bc 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -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(