s/PREFIX/EPREFIX/
authorKito <kito@gentoo.org>
Fri, 24 Mar 2006 05:27:29 +0000 (05:27 -0000)
committerKito <kito@gentoo.org>
Fri, 24 Mar 2006 05:27:29 +0000 (05:27 -0000)
svn path=/main/branches/prefix/; revision=2984

12 files changed:
bin/dosym
bin/ebuild.sh
bin/emerge
bin/env-update.sh
bin/etc-update
bin/misc-functions.sh
bin/prepstrip
bin/repoman
cnf/make.conf.ppc-macos
pym/portage.py
pym/portage_const.py
pym/portage_const_autotool.py

index 5a5cd287f035961051ce382ee96e10ff7df18619..48276f49d169eadf13d52fd090a05706b3d9057d 100755 (executable)
--- a/bin/dosym
+++ b/bin/dosym
@@ -10,6 +10,6 @@ fi
 
 target="${1}"
 linkname="${2}"
-[[ ${target:0:1} == "/" ]] && target="${PREFIX}${target}"
+[[ ${target:0:1} == "/" ]] && target="${EPREFIX}${target}"
 exec ln -snf "${target}" "${D}/${linkname}"
 
index 680444df2d89d878a7aa48ee2023edb569ead0aa..e3b2cec5b887b40ed171e4c493ecb08d447a98fc 100755 (executable)
@@ -40,7 +40,7 @@ alias restore_IFS='if [ "${old_IFS:-unset}" != "unset" ]; then IFS="${old_IFS}";
 
 OCC="$CC"
 OCXX="$CXX"
-source ${PREFIX}/etc/profile.env &>/dev/null
+source ${EPREFIX}/etc/profile.env &>/dev/null
 if [ -f "${PORTAGE_BASHRC}" ]; then
        # If $- contains x, then tracing has already enabled elsewhere for some
        # reason.  We preserve it's state so as not to interfere.
@@ -191,14 +191,14 @@ best_version() {
 with_bindir() {
        local mybindir
        if [ -z "${1}" ]; then
-               if [ ! -z "${PREFIX}" ]; then
-                       mybindir="${PREFIX}/bin"
+               if [ ! -z "${EPREFIX}" ]; then
+                       mybindir="${EPREFIX}/bin"
                else
                        mybindir="/bin"
                fi
        else
-               if [ ! -z "${PREFIX}" ]; then
-                       mybindir="${PREFIX}${1}"
+               if [ ! -z "${EPREFIX}" ]; then
+                       mybindir="${EPREFIX}${1}"
                else
                        mybindir="${1}"
                fi
@@ -210,14 +210,14 @@ with_bindir() {
 with_datadir() {
        local mydatadir
        if [ -z "${1}" ]; then
-               if [ ! -z "${PREFIX}" ]; then
-                       mydatadir="${PREFIX}/usr/share"
+               if [ ! -z "${EPREFIX}" ]; then
+                       mydatadir="${EPREFIX}/usr/share"
                else
                        mydatadir=/usr/share
                fi
        else
-               if [ ! -z "${PREFIX}" ]; then
-                       mydatadir="${PREFIX}${1}"
+               if [ ! -z "${EPREFIX}" ]; then
+                       mydatadir="${EPREFIX}${1}"
                else
                        mydatadir="${1}"
                fi
@@ -229,14 +229,14 @@ with_datadir() {
 with_infodir() {
        local myinfodir
        if [ -z "${1}" ]; then
-               if [ ! -z "${PREFIX}" ]; then
-                       myinfodir="${PREFIX}/usr/share/info"
+               if [ ! -z "${EPREFIX}" ]; then
+                       myinfodir="${EPREFIX}/usr/share/info"
                else
                        myinfodir=/usr/share/info
                fi
        else
-               if [ ! -z "${PREFIX}" ]; then
-                       myinfodir="${PREFIX}${1}"
+               if [ ! -z "${EPREFIX}" ]; then
+                       myinfodir="${EPREFIX}${1}"
                else
                        myinfodir="${1}"
                fi
@@ -248,14 +248,14 @@ with_infodir() {
 with_mandir() {
        local mymandir
        if [ -z "${1}" ]; then
-               if [ ! -z "${PREFIX}" ]; then
-                       mymandir="${PREFIX}/usr/share/man"
+               if [ ! -z "${EPREFIX}" ]; then
+                       mymandir="${EPREFIX}/usr/share/man"
                else
                        mymandir=/usr/share/man
                fi
        else
-               if [ ! -z "${PREFIX}" ]; then
-                       mymandir="${PREFIX}${1}"
+               if [ ! -z "${EPREFIX}" ]; then
+                       mymandir="${EPREFIX}${1}"
                else
                        mymandir="${1}"
                fi
@@ -267,14 +267,14 @@ with_mandir() {
 with_prefix() {
        local myprefix
        if [ -z "${1}" ]; then
-               if [ ! -z "${PREFIX}" ]; then
-                       myprefix="${PREFIX}/usr"
+               if [ ! -z "${EPREFIX}" ]; then
+                       myprefix="${EPREFIX}/usr"
                else
                        myprefix=/usr
                fi
        else
-               if [ ! -z "${PREFIX}" ]; then
-                       myprefix="${PREFIX}${1}"
+               if [ ! -z "${EPREFIX}" ]; then
+                       myprefix="${EPREFIX}${1}"
                else
                        myprefix="${1}"
                fi
@@ -286,14 +286,14 @@ with_prefix() {
 with_sysconfdir() {
        local myconfdir
        if [ -z "${1}" ]; then
-               if [ ! -z "${PREFIX}" ]; then
-                       myconfdir="${PREFIX}/etc"
+               if [ ! -z "${EPREFIX}" ]; then
+                       myconfdir="${EPREFIX}/etc"
                else
                        myconfdir=/etc
                fi
        else
-               if [ ! -z "${PREFIX}" ]; then
-                       myconfdir="${PREFIX}${1}"
+               if [ ! -z "${EPREFIX}" ]; then
+                       myconfdir="${EPREFIX}${1}"
                else
                        myconfdir="${1}"
                fi
@@ -305,14 +305,14 @@ with_sysconfdir() {
 with_localstatedir() {
        local mylocalstatedir
        if [ -z "${1}" ]; then
-               if [ ! -z "${PREFIX}" ]; then
-                       mylocalstatedir="${PREFIX}/var/lib"
+               if [ ! -z "${EPREFIX}" ]; then
+                       mylocalstatedir="${EPREFIX}/var/lib"
                else
                        mylocalstatedir="/var/lib"
                fi
        else
-               if [ ! -z "${PREFIX}" ]; then
-                       mylocalstatedir="${PREFIX}${1}"
+               if [ ! -z "${EPREFIX}" ]; then
+                       mylocalstatedir="${EPREFIX}${1}"
                else
                        mylocalstatedir="${1}"
                fi
@@ -558,10 +558,10 @@ econf() {
                ECONF_SOURCE="."
        fi
        if [ -x "${ECONF_SOURCE}/configure" ]; then
-               if [ -e ${PREFIX}/usr/share/gnuconfig/ ]; then
+               if [ -e ${EPREFIX}/usr/share/gnuconfig/ ]; then
                        for x in $(find "${WORKDIR}" -type f '(' -name config.guess -o -name config.sub ')') ; do
-                               echo " * econf: updating ${x/${WORKDIR}\/} with ${PREFIX}/usr/share/gnuconfig/${x##*/}"
-                               cp -f ${PREFIX}/usr/share/gnuconfig/${x##*/} ${x}
+                               echo " * econf: updating ${x/${WORKDIR}\/} with ${EPREFIX}/usr/share/gnuconfig/${x##*/}"
+                               cp -f ${EPREFIX}/usr/share/gnuconfig/${x##*/} ${x}
                        done
                fi
 
@@ -592,7 +592,7 @@ econf() {
                                CONF_PREFIX=${pref}
                                [ "${CONF_PREFIX:0:1}" != "/" ] && CONF_PREFIX="/${CONF_PREFIX}"
                        else
-                               CONF_PREFIX="${PREFIX}/usr"
+                               CONF_PREFIX="${EPREFIX}/usr"
                        fi
                        export CONF_PREFIX
                        [ "${CONF_LIBDIR:0:1}" != "/" ] && CONF_LIBDIR="/${CONF_LIBDIR}"
@@ -632,24 +632,24 @@ econf() {
                fi
 
                echo ${CONFCACHE} ${CONFCACHE_ARG} ${TMP_CONFCACHE_DIR} "${ECONF_SOURCE}/configure" \
-                       --prefix=${PREFIX}/usr \
+                       --prefix=${EPREFIX}/usr \
                        --host=${CHOST} \
-                       --mandir=${PREFIX}/usr/share/man \
-                       --infodir=${PREFIX}/usr/share/info \
-                       --datadir=${PREFIX}/usr/share \
-                       --sysconfdir=${PREFIX}/etc \
-                       --localstatedir=${PREFIX}/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=${PREFIX}/usr \
+                       --prefix=${EPREFIX}/usr \
                        --host=${CHOST} \
-                       --mandir=${PREFIX}/usr/share/man \
-                       --infodir=${PREFIX}/usr/share/info \
-                       --datadir=${PREFIX}/usr/share \
-                       --sysconfdir=${PREFIX}/etc \
-                       --localstatedir=${PREFIX}/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}; then
 
@@ -1469,13 +1469,13 @@ if [ "$*" != "depend" ] && [ "$*" != "clean" ] && [ "$*" != "setup" ]; then
        fi
 
        if hasq distcc ${FEATURES} &>/dev/null; then
-               if [ -d ${PREFIX}/usr/lib/distcc/bin ]; then
+               if [ -d ${EPREFIX}/usr/lib/distcc/bin ]; then
                        #We can enable distributed compile support
                        if [ -z "${PATH/*distcc*/}" ]; then
                                # Remove the other reference.
                                remove_path_entry "distcc"
                        fi
-                       export PATH="${PREFIX}/usr/lib/distcc/bin:${PATH}"
+                       export PATH="${EPREFIX}/usr/lib/distcc/bin:${PATH}"
                        [ ! -z "${DISTCC_LOG}" ] && addwrite "$(dirname ${DISTCC_LOG})"
                elif which distcc &>/dev/null; then
                        export CC="distcc $CC"
@@ -1490,13 +1490,13 @@ if [ "$*" != "depend" ] && [ "$*" != "clean" ] && [ "$*" != "setup" ]; then
                        remove_path_entry "ccache"
                fi
 
-               if [ -d ${PREFIX}/usr/lib/ccache/bin ]; then
-                       export PATH="${PREFIX}/usr/lib/ccache/bin:${PATH}"
-               elif [ -d ${PREFIX}/usr/bin/ccache ]; then
-                       export PATH="${PREFIX}/usr/bin/ccache:${PATH}"
+               if [ -d ${EPREFIX}/usr/lib/ccache/bin ]; then
+                       export PATH="${EPREFIX}/usr/lib/ccache/bin:${PATH}"
+               elif [ -d ${EPREFIX}/usr/bin/ccache ]; then
+                       export PATH="${EPREFIX}/usr/bin/ccache:${PATH}"
                fi
 
-               [ -z "${CCACHE_DIR}" ] && export CCACHE_DIR="${PREFIX}/var/tmp/ccache"
+               [ -z "${CCACHE_DIR}" ] && export CCACHE_DIR="${EPREFIX}/var/tmp/ccache"
 
                addread "${CCACHE_DIR}"
                addwrite "${CCACHE_DIR}"
index 3ce49c4c9cf47dddb421c440a9db2277eea8cd66..6afc9afad3d09c577db70e5ce4f933b336e19a0a 100755 (executable)
@@ -439,7 +439,7 @@ def emergelog(mystr,short_msg=None):
                        xtermTitle(mystr)
        try:
                #seems odd opening a file each write...
-               elog = portage_const.PREFIX+"/var/log/emerge.log"
+               elog = portage_const.EPREFIX+"/var/log/emerge.log"
                if not os.path.exists(elog):
                        mylogfile=open(elog, "w")
                        os.chmod(elog, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP)
@@ -568,7 +568,7 @@ def getgccversion():
 def getportageversion():
        try:
                import re
-               profilever = os.path.normpath("///"+os.readlink(portage_const.PREFIX+"/etc/make.profile"))
+               profilever = os.path.normpath("///"+os.readlink(portage_const.EPREFIX+"/etc/make.profile"))
                basepath   = os.path.normpath("///"+portage.settings["PORTDIR"]+"/profiles")
                if re.match(basepath,profilever):
                        profilever = profilever[len(basepath)+1:]
@@ -2508,7 +2508,7 @@ if myaction in ["sync","metadata"] and (not "--help" in myopts):
                updatecache_flg = True
                tmpservertimestampfile = None
        elif syncuri[:8]=="rsync://":
-               if not os.path.exists(portage_const.PREFIX+"/usr/bin/rsync"):
+               if not os.path.exists(portage_const.EPREFIX+"/usr/bin/rsync"):
                        print "!!! rsync does not exist, so rsync support is disabled."
                        print "!!! Type \"emerge net-misc/rsync\" to enable rsync support."
                        sys.exit(1)
@@ -2695,7 +2695,7 @@ if myaction in ["sync","metadata"] and (not "--help" in myopts):
                        if "--quiet" not in myopts:
                                print ">>> Checking server timestamp ..."
 
-                       rsynccommand = " ".join([portage_const.PREFIX,"/usr/bin/rsync",
+                       rsynccommand = " ".join([portage_const.EPREFIX,"/usr/bin/rsync",
                                portage.settings["PORTAGE_RSYNC_EXTRA_OPTS"],
                                " ".join(rsync_opts)])
 
@@ -3019,8 +3019,8 @@ elif "info"==myaction:
        print getportageversion()
        print "================================================================="
        print "System uname: "+unameout
-       if os.path.exists(portage_const.PREFIX+"/etc/gentoo-release"):
-               os.system("cat "+portage_const.PREFIX+"/etc/gentoo-release")
+       if os.path.exists(portage_const.EPREFIX+"/etc/gentoo-release"):
+               os.system("cat "+portage_const.EPREFIX+"/etc/gentoo-release")
        else:
                print "Unknown Host Operating System"
 
index 6fd8694ceba8ef0f917efa2753e63a2107854c20..6966a12268a8e199eded3e3c481b20fd1c4ff102 100755 (executable)
@@ -197,9 +197,9 @@ unset my_envd_LDPATH
 
 echo ">>> Regenerating ${ROOT}etc/ld.so.cache..."
 if [[ ${MAKELINKS} -eq 0 ]] ; then
-       (cd / ; ${PREFIX}/sbin/ldconfig -X -r ${ROOT} >& /dev/null)
+       (cd / ; ${EPREFIX}/sbin/ldconfig -X -r ${ROOT} >& /dev/null)
 else
-       (cd / ; ${PREFIX}/sbin/ldconfig -r ${ROOT} >& /dev/null)
+       (cd / ; ${EPREFIX}/sbin/ldconfig -r ${ROOT} >& /dev/null)
 fi
 
 cat << EOF > ${PROFILEENV}
index 06b55bc85db9e42279e94c9c733234d7f39082be..26fd026d1d5acd19cddac60d5cdc5eb2aab495d0 100755 (executable)
@@ -12,7 +12,7 @@
 
 export PORTAGE_CALLER="etc-update"
 
-eval $(python -c 'import portage_const;print "export PREFIX="+portage_const.PREFIX;print "export PORTAGE_BIN_PATH="+portage_const.PORTAGE_BIN_PATH;')
+eval $(python -c 'import portage_const;print "export PREFIX="+portage_const.EPREFIX;print "export PORTAGE_BIN_PATH="+portage_const.PORTAGE_BIN_PATH;')
 
 if type -p gsed >/dev/null ; then
        function sed() { gsed "$@"; }
@@ -24,7 +24,7 @@ function get_config() {
        # First strip off comment lines, then grab the configuration
        # item. If there's more than one of the same configuration item,
        # then allow the last setting to take precedence.
-       cut -d'#' -f1-1 ${PREFIX}/etc/etc-update.conf | \
+       cut -d'#' -f1-1 ${EPREFIX}/etc/etc-update.conf | \
                sed -ne "s/^ *$item *= *\([\"']\{0,1\}\)\(.*\)\1/\2/p" |sed -e '$p;d'
 }
 
@@ -67,7 +67,7 @@ function scan() {
                                        if [ ! -e "${rpath}/${rfile}" ] || [ ! -e "${rpath}/${rfile:10}" ]; then
                                                MATCHES=0
                                        else
-                                               diff -Bbua ${rpath}/${rfile} ${rpath}/${rfile:10} | ${PREFIX}/bin/grep -E '^[+-]' | ${PREFIX}/bin/grep -E -v '^[+-][\t ]*#|^--- |^\+\+\+ ' | ${PREFIX}/bin/grep -E -qv '^[-+][\t ]*$'
+                                               diff -Bbua ${rpath}/${rfile} ${rpath}/${rfile:10} | ${EPREFIX}/bin/grep -E '^[+-]' | ${EPREFIX}/bin/grep -E -v '^[+-][\t ]*#|^--- |^\+\+\+ ' | ${EPREFIX}/bin/grep -E -qv '^[-+][\t ]*$'
                                                MATCHES=$?
                                        fi
                                elif [[ -z `diff -Nua ${rpath}/${rfile} ${rpath}/${rfile:10}|
index 21983f4ae69260bd3409fdf15d9a5a5c65612f63..35a7349448b67a3a9c649039573c01ade465a32d 100644 (file)
@@ -302,12 +302,12 @@ preinst_mask() {
                 eerror "${FUNCNAME}: IMAGE is unset"
                 return 1
        else
-               IMAGE="${IMAGE}/${PREFIX}"
+               IMAGE="${IMAGE}/${EPREFIX}"
        fi
        # remove man pages, info pages, docs if requested
        for f in man info doc; do
                if hasq no${f} $FEATURES; then
-                       INSTALL_MASK="${INSTALL_MASK} ${PREFIX}/usr/share/${f}"
+                       INSTALL_MASK="${INSTALL_MASK} ${EPREFIX}/usr/share/${f}"
                fi
        done
 
@@ -346,7 +346,7 @@ preinst_suid_scan() {
        fi
        # total suid control.
        if hasq suidctl $FEATURES; then
-               sfconf=${PREFIX}/etc/portage/suidctl.conf
+               sfconf=${EPREFIX}/etc/portage/suidctl.conf
                echo ">>> Preforming suid scan in ${IMAGE}"
                for i in $(find ${IMAGE}/ -type f \( -perm -4000 -o -perm -2000 \) ); do
                        if [ -s "${sfconf}" ]; then
@@ -387,15 +387,15 @@ preinst_selinux_labels() {
                # SELinux file labeling (needs to always be last in dyn_preinst)
                # only attempt to label if setfiles is executable
                # and 'context' is available on selinuxfs.
-               if [ -f /selinux/context -a -x ${PREFIX}/usr/sbin/setfiles -a -x ${PREFIX}/usr/sbin/selinuxconfig ]; then
+               if [ -f /selinux/context -a -x ${EPREFIX}/usr/sbin/setfiles -a -x ${EPREFIX}/usr/sbin/selinuxconfig ]; then
                        echo ">>> Setting SELinux security labels"
                        (
-                               eval "$(${PREFIX}/usr/sbin/selinuxconfig)" || \
+                               eval "$(${EPREFIX}/usr/sbin/selinuxconfig)" || \
                                        die "Failed to determine SELinux policy paths.";
        
                                addwrite /selinux/context;
        
-                               ${PREFIX}/usr/sbin/setfiles "${file_contexts_path}" -r "${IMAGE}" "${IMAGE}";
+                               ${EPREFIX}/usr/sbin/setfiles "${file_contexts_path}" -r "${IMAGE}" "${IMAGE}";
                        ) || die "Failed to set SELinux security labels."
                else
                        # nonfatal, since merging can happen outside a SE kernel
index 596ec8e9a31e8bdc97058b57de03cd5bd3acf458..b45cd56435631e1526869c6e14516853dbb846aa 100755 (executable)
@@ -35,8 +35,8 @@ save_elf_debug() {
 
        [[ " ${FEATURES} " != *" installsources "* ]] && return 0
 
-       if [[ -x "${PREFIX}/usr/bin/debugedit" ]] ; then
-               debugedit -b "${WORKDIR}" -d "${PREFIX}"/usr/src/debug/${PF} -l "${T}"/debug.sources "${x}"
+       if [[ -x "${EPREFIX}/usr/bin/debugedit" ]] ; then
+               debugedit -b "${WORKDIR}" -d "${EPREFIX}"/usr/src/debug/${PF} -l "${T}"/debug.sources "${x}"
                if [[ -s ${T}/debug.sources ]] ; then 
                        [[ -d ${D}/usr/src/debug/${PF} ]] || mkdir -p "${D}/usr/src/debug/${PF}"
                        cat "${T}"/debug.sources | (cd "${WORKDIR}"; LANG=C sort -z -u | xargs -0 -- cp --parents -p --target-directory="${D}/usr/src/debug/${PF}" )
index d57ac4e36c85fc003ebfe643de01d25c82acb154..dc5215c3cd4380abe72e2b57a8555ca0678b1a44 100755 (executable)
@@ -1216,7 +1216,7 @@ for x in scanlist:
                                                        fails[mykey].append(x+"/"+y+".ebuild: "+keyword+"("+prof[0]+") "+repr(mydep[1]))
 
                # this check needs work, it won't catch (\ndie)
-               if not os.system(portage_const.PREFIX+"/usr/bin/grep -E '^[^#]*\([^)]*\<die\>' "+checkdir+"/"+y+".ebuild >/dev/null 2>&1"):
+               if not os.system(portage_const.EPREFIX+"/usr/bin/grep -E '^[^#]*\([^)]*\<die\>' "+checkdir+"/"+y+".ebuild >/dev/null 2>&1"):
                        stats["ebuild.nesteddie"]=stats["ebuild.nesteddie"]+1
                        fails["ebuild.nesteddie"].append(x+"/"+y+".ebuild")
                # uselist checks - global
@@ -1543,7 +1543,7 @@ else:
                        del mymissing
                retval=["",""]
                print "Performing a "+green("cvs -n up")+" with a little magic grep to check for updates."
-               retval=getstatusoutput("cvs -n up 2>&1 | "+portage_const.PREFIX+"/bin/grep -E '^[^\?] .*' | "+portage_const.PREFIX+"/bin/grep -E -v '^. .*/digest-[^/]+|^cvs server: .* -- ignored$'")
+               retval=getstatusoutput("cvs -n up 2>&1 | "+portage_const.EPREFIX+"/bin/grep -E '^[^\?] .*' | "+portage_const.EPREFIX+"/bin/grep -E -v '^. .*/digest-[^/]+|^cvs server: .* -- ignored$'")
                mylines=string.split(retval[1], "\n")
 
                for x in mylines:
@@ -1583,7 +1583,7 @@ else:
                headerstring="'\$(Header|Id)"
                headerstring+=".*\$'"
                for myfile in myupdates:
-                       myout=getstatusoutput(portage_const.PREFIX+"/bin/grep -E -q "+headerstring+" "+myfile)
+                       myout=getstatusoutput(portage_const.EPREFIX+"/bin/grep -E -q "+headerstring+" "+myfile)
                        if myout[0]==0:
                                myheaders.append(myfile)
 
index 3f0f7b406b52701ead1d092d1bacab70af401987..48bb7237d24214164da213709e0e1783f5780ed7 100644 (file)
@@ -112,13 +112,13 @@ PREFIX=/Library/Gentoo
 # PORTAGE_TMPDIR is the location portage will use for compilations and
 #     temporary storage of data. This can get VERY large depending upon
 #     the application being installed.
-PORTAGE_TMPDIR="${PREFIX}/var/tmp"
+PORTAGE_TMPDIR="${EPREFIX}/var/tmp"
 #
 # PORTDIR is the location of the portage tree. This is the repository
 #     for all profile information as well as all ebuilds. If you change
-#     this, you must update your ${PREFIX}"/etc/make.profile symlink 
+#     this, you must update your ${EPREFIX}"/etc/make.profile symlink 
 #     accordingly.
-PORTDIR="${PREFIX}/usr/portage"
+PORTDIR="${EPREFIX}/usr/portage"
 #
 # DISTDIR is where all of the source code tarballs will be placed for
 #     emerges. The source code is maintained here unless you delete
@@ -138,12 +138,12 @@ PORTDIR="${PREFIX}/usr/portage"
 #     providing a directory. Permissions will be modified as needed IF the
 #     directory exists, otherwise logging will be disabled. NNNN is the
 #     increment at the time the log is created. Logs are thus sequential.
-PORT_LOGDIR="${PREFIX}/var/log/portage"
+PORT_LOGDIR="${EPREFIX}/var/log/portage"
 #
 # PORTDIR_OVERLAY is a directory where local ebuilds may be stored without
 #     concern that they will be deleted by rsync updates. Default is not
 #     defined.
-PORTDIR_OVERLAY="${PREFIX}/usr/local/portage"
+PORTDIR_OVERLAY="${EPREFIX}/usr/local/portage"
 
 # Fetching files 
 # ==============
@@ -156,19 +156,19 @@ PORTDIR_OVERLAY="${PREFIX}/usr/local/portage"
 # alternate ownloaders -- note that you need to merge these programs first.
 #
 # curl groks urls
-FETCHCOMMAND="${PREFIX}/usr/bin/curl -f --connect-timeout 15 -# -o \${DISTDIR}/\${FILE} \${URI}"
-RESUMECOMMAND="${PREFIX}/usr/bin/curl -f --connect-timeout 15 -# -C - -o \${DISTDIR}/\${FILE} \${URI}"
+FETCHCOMMAND="${EPREFIX}/usr/bin/curl -f --connect-timeout 15 -# -o \${DISTDIR}/\${FILE} \${URI}"
+RESUMECOMMAND="${EPREFIX}/usr/bin/curl -f --connect-timeout 15 -# -C - -o \${DISTDIR}/\${FILE} \${URI}"
 # Default wget fetch command (5 tries, passive ftp for firewall compatibility)
-#FETCHCOMMAND="${PREFIX}/usr/bin/wget -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
-#RESUMECOMMAND="${PREFIX}/usr/bin/wget -c -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
+#FETCHCOMMAND="${EPREFIX}/usr/bin/wget -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
+#RESUMECOMMAND="${EPREFIX}/usr/bin/wget -c -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
 #
 # Using wget, ratelimiting downloads
-#FETCHCOMMAND="${PREFIX}/usr/bin/wget -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
-#RESUMECOMMAND="${PREFIX}/usr/bin/wget -c -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
+#FETCHCOMMAND="${EPREFIX}/usr/bin/wget -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
+#RESUMECOMMAND="${EPREFIX}/usr/bin/wget -c -t 5 --passive-ftp --limit-rate=200k \${URI} -P \${DISTDIR}"
 #
 # Lukemftp (BSD ftp):
-#FETCHCOMMAND="${PREFIX}/usr/bin/lukemftp -s -a -o \${DISTDIR}/\${FILE} \${URI}"
-#RESUMECOMMAND="${PREFIX}/usr/bin/lukemftp -s -a -R -o \${DISTDIR}/\${FILE} \${URI}"
+#FETCHCOMMAND="${EPREFIX}/usr/bin/lukemftp -s -a -o \${DISTDIR}/\${FILE} \${URI}"
+#RESUMECOMMAND="${EPREFIX}/usr/bin/lukemftp -s -a -R -o \${DISTDIR}/\${FILE} \${URI}"
 #
 # Portage uses GENTOO_MIRRORS to specify mirrors to use for source retrieval.
 # The list is a space separated list which is read left to right. If you use
@@ -318,7 +318,7 @@ FEATURES="-autoaddcvs -sandbox -sfperms -userpriv -distlocks"
 #     2G, and will be set if not defined otherwise and ccache is in features. 
 #     Portage will set the default ccache dir if it is not present in the
 #     user's environment, for userpriv it sets: ${PORTAGE_TMPDIR}/ccache
-#     (${PREFIX}/var/tmp/ccache), and for regular use the default is /root/.ccache.
+#     (${EPREFIX}/var/tmp/ccache), and for regular use the default is /root/.ccache.
 #     Sizes are specified with 'G' 'M' or 'K'.
 #     '2G' for 2 gigabytes, '2048M' for 2048 megabytes (same as 2G).
 #CCACHE_SIZE="512M"
@@ -331,7 +331,7 @@ FEATURES="-autoaddcvs -sandbox -sfperms -userpriv -distlocks"
 #     consideration. This may cause dependency failures if you are not careful.
 #     The file format is one pattern per line, blanks and ';' or '#' lines are
 #     comments. See 'man rsync' for more details on the exclude-from format.
-#RSYNC_EXCLUDEFROM=${PREFIX}/etc/portage/rsync_excludes
+#RSYNC_EXCLUDEFROM=${EPREFIX}/etc/portage/rsync_excludes
 
 # logging related variables:
 # PORTAGE_ELOG_CLASSES: selects messages to be logged, possible values are:
index 352f740bfbeccc667daa747bcdd90df552dc65fe..679852c06e94bba3ce2101ca034c04a530179740 100644 (file)
@@ -506,11 +506,11 @@ endversion_keys = ["pre", "p", "alpha", "beta", "rc"]
 
 def env_update(makelinks=1):
        global root
-       if not os.path.exists(root+portage_const.PREFIX+"/etc/env.d"):
+       if not os.path.exists(root+portage_const.EPREFIX+"/etc/env.d"):
                prevmask=os.umask(0)
-               os.makedirs(root+portage_const.PREFIX+"/etc/env.d",0755)
+               os.makedirs(root+portage_const.EPREFIX+"/etc/env.d",0755)
                os.umask(prevmask)
-       fns=listdir(root+portage_const.PREFIX+"/etc/env.d",EmptyOnError=1)
+       fns=listdir(root+portage_const.EPREFIX+"/etc/env.d",EmptyOnError=1)
        fns.sort()
        pos=0
        while (pos<len(fns)):
@@ -541,9 +541,9 @@ def env_update(makelinks=1):
                # don't process backup files
                if x[-1]=='~' or x[-4:]==".bak":
                        continue
-               myconfig=getconfig(root+portage_const.PREFIX+"/etc/env.d/"+x)
+               myconfig=getconfig(root+portage_const.EPREFIX+"/etc/env.d/"+x)
                if myconfig==None:
-                       writemsg("!!! Parsing error in "+str(root)+portage_const.PREFIX+"/etc/env.d/"+str(x)+"\n")
+                       writemsg("!!! Parsing error in "+str(root)+portage_const.EPREFIX+"/etc/env.d/"+str(x)+"\n")
                        #parse error
                        continue
                # process PATH, CLASSPATH, LDPATH
@@ -558,8 +558,8 @@ def env_update(makelinks=1):
                for myenv in myconfig.keys():
                        env[myenv]=myconfig[myenv]
 
-       if os.path.exists(root+portage_const.PREFIX+"/etc/ld.so.conf"):
-               myld=open(root+portage_const.PREFIX+"/etc/ld.so.conf")
+       if os.path.exists(root+portage_const.EPREFIX+"/etc/ld.so.conf"):
+               myld=open(root+portage_const.EPREFIX+"/etc/ld.so.conf")
                myldlines=myld.readlines()
                myld.close()
                oldld=[]
@@ -578,9 +578,9 @@ def env_update(makelinks=1):
        newld=specials["LDPATH"]
        if (oldld!=newld):
                #ld.so.conf needs updating and ldconfig needs to be run
-               myfd = atomic_ofstream(os.path.join(root, portage_const.PREFIX, "etc", "ld.so.conf"))
+               myfd = atomic_ofstream(os.path.join(root, portage_const.EPREFIX, "etc", "ld.so.conf"))
                myfd.write("# ld.so.conf autogenerated by env-update; make all changes to\n")
-               myfd.write("# contents of "+portage_const.PREFIX+"/etc/env.d directory\n")
+               myfd.write("# contents of "+portage_const.EPREFIX+"/etc/env.d directory\n")
                for x in specials["LDPATH"]:
                        myfd.write(x+"\n")
                myfd.close()
@@ -588,11 +588,11 @@ def env_update(makelinks=1):
 
        # Update prelink.conf if we are prelink-enabled
        if prelink_capable:
-               newprelink = atomic_ofstream(os.path.join(root, portage_const.PREFIX, "etc", "prelink.conf"))
+               newprelink = atomic_ofstream(os.path.join(root, portage_const.EPREFIX, "etc", "prelink.conf"))
                newprelink.write("# prelink.conf autogenerated by env-update; make all changes to\n")
-               newprelink.write("# contents of "+portage_const.PREFIX+"/etc/env.d directory\n")
+               newprelink.write("# contents of "+portage_const.EPREFIX+"/etc/env.d directory\n")
 
-               for x in map(lambda x: os.path.join(portage_const.PREFIX,x), ["bin","sbin","usr/bin","usr/sbin","lib","usr/lib"]):
+               for x in map(lambda x: os.path.join(portage_const.EPREFIX,x), ["bin","sbin","usr/bin","usr/sbin","lib","usr/lib"]):
                        newprelink.write("-l "+x+"\n");
                for x in specials["LDPATH"]+specials["PATH"]+specials["PRELINK_PATH"]:
                        if not x:
@@ -617,7 +617,7 @@ def env_update(makelinks=1):
        if not mtimedb.has_key("ldpath"):
                mtimedb["ldpath"]={}
 
-       for x in map(lambda x: portage_const.PREFIX+x, specials["LDPATH"]+['/usr/lib','/lib']):
+       for x in map(lambda x: portage_const.EPREFIX+x, specials["LDPATH"]+['/usr/lib','/lib']):
                try:
                        newldpathtime=os.stat(x)[stat.ST_MTIME]
                except SystemExit, e:
@@ -644,12 +644,12 @@ def env_update(makelinks=1):
                        # we can safely create links.
                        writemsg(">>> Regenerating "+str(root)+"etc/ld.so.cache...\n")
                        if makelinks:
-                               commands.getstatusoutput("cd / ; "+portage_const.PREFIX+"/sbin/ldconfig -r "+root)
+                               commands.getstatusoutput("cd / ; "+portage_const.EPREFIX+"/sbin/ldconfig -r "+root)
                        else:
-                               commands.getstatusoutput("cd / ; "+portage_const.PREFIX+"/sbin/ldconfig -X -r "+root)
+                               commands.getstatusoutput("cd / ; "+portage_const.EPREFIX+"/sbin/ldconfig -X -r "+root)
                elif ostype in ("FreeBSD","DragonFly"):
                        writemsg(">>> Regenerating "+str(root)+"var/run/ld-elf.so.hints...\n")
-                       commands.getstatusoutput("cd / ; "+portage_const.PREFIX+"/sbin/ldconfig -elf -i -f "+str(root)+portage_const.PREFIX+"/var/run/ld-elf.so.hints "+str(root)+portage_const.PREFIX+"/etc/ld.so.conf")
+                       commands.getstatusoutput("cd / ; "+portage_const.EPREFIX+"/sbin/ldconfig -elf -i -f "+str(root)+portage_const.EPREFIX+"/var/run/ld-elf.so.hints "+str(root)+portage_const.EPREFIX+"/etc/ld.so.conf")
                        commands.getstatusoutput("cd / ; /sbin/ldconfig -elf -i -f "+str(root)+"var/run/ld-elf.so.hints "+str(root)+"etc/ld.so.conf")
 
        del specials["LDPATH"]
@@ -657,11 +657,11 @@ def env_update(makelinks=1):
        penvnotice  = "# THIS FILE IS AUTOMATICALLY GENERATED BY env-update.\n"
        penvnotice += "# DO NOT EDIT THIS FILE. CHANGES TO STARTUP PROFILES\n"
        cenvnotice  = penvnotice[:]
-       penvnotice += "# GO INTO "+portage_const.PREFIX+"/etc/profile NOT "+portage_const.PREFIX+"/etc/profile.env\n\n"
-       cenvnotice += "# GO INTO "+portage_const.PREFIX+"/etc/csh.cshrc NOT "+portage_const.PREFIX+"/etc/csh.env\n\n"
+       penvnotice += "# GO INTO "+portage_const.EPREFIX+"/etc/profile NOT "+portage_const.EPREFIX+"/etc/profile.env\n\n"
+       cenvnotice += "# GO INTO "+portage_const.EPREFIX+"/etc/csh.cshrc NOT "+portage_const.EPREFIX+"/etc/csh.env\n\n"
 
        #create /etc/profile.env for bash support
-       outfile = atomic_ofstream(os.path.join(root, portage_const.PREFIX, "etc", "profile.env"))
+       outfile = atomic_ofstream(os.path.join(root, portage_const.EPREFIX, "etc", "profile.env"))
        outfile.write(penvnotice)
 
        for path in specials.keys():
@@ -685,7 +685,7 @@ def env_update(makelinks=1):
        outfile.close()
 
        #create /etc/csh.env for (t)csh support
-       outfile = atomic_ofstream(os.path.join(root, portage_const.PREFIX, "etc", "csh.env"))
+       outfile = atomic_ofstream(os.path.join(root, portage_const.EPREFIX, "etc", "csh.env"))
        outfile.write(cenvnotice)
 
        for path in specials.keys():
@@ -1569,7 +1569,7 @@ class config:
                                break
 
                if mykey == "CONFIG_PROTECT_MASK":
-                       match += " "+portage_const.PREFIX+"/etc/env.d"
+                       match += " "+portage_const.EPREFIX+"/etc/env.d"
 
                return match
 
@@ -2409,7 +2409,7 @@ def doebuild_environment(myebuild, mydo, myroot, mysettings, debug, use_cache, t
                # due to how it's coded... Don't overwrite this so we can use it.
                mysettings["PORTAGE_DEBUG"]=str(debug)
 
-       mysettings["ROOT"]     = os.path.normpath(myroot+portage_const.PREFIX)
+       mysettings["ROOT"]     = os.path.normpath(myroot+portage_const.EPREFIX)
        mysettings["STARTDIR"] = getcwd()
 
        mysettings["EBUILD"]   = ebuild_path
@@ -2426,7 +2426,7 @@ def doebuild_environment(myebuild, mydo, myroot, mysettings, debug, use_cache, t
        mysettings["PN"] = mysplit[0]
        mysettings["PV"] = mysplit[1]
        mysettings["PR"] = mysplit[2]
-       mysettings["PREFIX"] = portage_const.PREFIX
+       mysettings["PREFIX"] = portage_const.EPREFIX
        if portage_util.noiselimit < 0:
                mysettings["PORTAGE_QUIET"] = "1"
 
@@ -2473,7 +2473,7 @@ def doebuild_environment(myebuild, mydo, myroot, mysettings, debug, use_cache, t
 
        mysettings["WORKDIR"] = os.path.join(mysettings["PORTAGE_BUILDDIR"], "work")
        mysettings["EDEST"] = os.path.join(mysettings["PORTAGE_BUILDDIR"], "image") + os.sep
-       mysettings["D"] = os.path.normpath(mysettings["EDEST"]+portage_const.PREFIX)
+       mysettings["D"] = os.path.normpath(mysettings["EDEST"]+portage_const.EPREFIX)
        mysettings["T"] = os.path.join(mysettings["PORTAGE_BUILDDIR"], "temp")
 
        mysettings["PORTAGE_BASHRC"] = EBUILD_SH_ENV_FILE
@@ -5523,7 +5523,7 @@ class dblink:
                        raise ValueError
 
                self.myroot=myroot
-               self.mergedir = os.path.normpath(myroot+os.path.sep+portage_const.PREFIX)
+               self.mergedir = os.path.normpath(myroot+os.path.sep+portage_const.EPREFIX)
                self.updateprotect()
                self.contentscache=[]
 
@@ -6096,7 +6096,7 @@ class dblink:
                return 0
 
        def mergeme(self,srcroot,destroot,outfile,secondhand,stufftomerge,cfgfiledict,thismtime):
-               prefix=os.path.normpath(portage_const.PREFIX)
+               prefix=os.path.normpath(portage_const.EPREFIX)
                os.path.normpath(os.path.sep+srcroot)
                if srcroot.endswith(prefix):
                        # Trim prefix from srcroot
@@ -6529,45 +6529,45 @@ if root != "/":
 
 #create tmp and var/tmp if they don't exist; read config
 os.umask(0)
-if not os.path.exists(root+portage_const.PREFIX+"/tmp"):
-       writemsg(">>> "+root+portage_const.PREFIX+"/tmp doesn't exist, creating it...\n")
-       os.mkdir(root+portage_const.PREFIX+"/tmp",01777)
-if not os.path.exists(root+portage_const.PREFIX+"/var/tmp"):
-       writemsg(">>> "+root+portage_const.PREFIX+"/var/tmp doesn't exist, creating it...\n")
+if not os.path.exists(root+portage_const.EPREFIX+"/tmp"):
+       writemsg(">>> "+root+portage_const.EPREFIX+"/tmp doesn't exist, creating it...\n")
+       os.mkdir(root+portage_const.EPREFIX+"/tmp",01777)
+if not os.path.exists(root+portage_const.EPREFIX+"/var/tmp"):
+       writemsg(">>> "+root+portage_const.EPREFIX+"/var/tmp doesn't exist, creating it...\n")
        try:
-               os.mkdir(root+portage_const.PREFIX+"/var",0755)
+               os.mkdir(root+portage_const.EPREFIX+"/var",0755)
        except (OSError,IOError):
                pass
        try:
-               os.mkdir(root+portage_const.PREFIX+"/var/tmp",01777)
+               os.mkdir(root+portage_const.EPREFIX+"/var/tmp",01777)
        except SystemExit, e:
                raise
        except:
-               writemsg("portage: couldn't create "+root+portage_const.PREFIX+"/var/tmp; exiting.\n")
+               writemsg("portage: couldn't create "+root+portage_const.EPREFIX+"/var/tmp; exiting.\n")
                sys.exit(1)
 
-if not os.path.exists(root+portage_const.PREFIX+"/var/lib/portage"):
-       writemsg(">>> "+root+portage_const.PREFIX+"/var/lib doesn't exist, creating it...\n")
+if not os.path.exists(root+portage_const.EPREFIX+"/var/lib/portage"):
+       writemsg(">>> "+root+portage_const.EPREFIX+"/var/lib doesn't exist, creating it...\n")
        try:
-               os.mkdir(root+portage_const.PREFIX+"/var",0755)
+               os.mkdir(root+portage_const.EPREFIX+"/var",0755)
        except (OSError,IOError):
                pass
        try:
-               os.mkdir(root+portage_const.PREFIX+"/var/lib",0755)
+               os.mkdir(root+portage_const.EPREFIX+"/var/lib",0755)
        except (OSError,IOError):
                pass
        try:
-               os.mkdir(root+portage_const.PREFIX+"/var/lib/portage",0755)
+               os.mkdir(root+portage_const.EPREFIX+"/var/lib/portage",0755)
        except SystemExit, e:
                raise
        except:
-               writemsg("portage: couldn't create "+root+portage_const.PREFIX+"/var/lib/portage; exiting.\n")
+               writemsg("portage: couldn't create "+root+portage_const.EPREFIX+"/var/lib/portage; exiting.\n")
                sys.exit(1)
 
 if not os.path.exists(root+portage_const.PORTAGE_BASE+""):
        writemsg(">>> "+root+portage_const.PORTAGE_BASE+" doesn't exist, creating it...\n")
        try:
-               os.mkdir(root+portage_const.PREFIX+"/var",0755)
+               os.mkdir(root+portage_const.EPREFIX+"/var",0755)
        except (OSError,IOError):
                pass
        try:
index 4cb3d64adf0fdcea0012aa6349564f66b81e9d07..2a5ed719d4a9ca2e53f19c0a593d4fad8076a1c0 100644 (file)
@@ -14,19 +14,19 @@ from portage_const_autotool import *
 # START OF CONSTANTS -- START OF CONSTANTS -- START OF CONSTANTS -- START OF
 # ===========================================================================
 
-VDB_PATH                = PREFIX+"/var/db/pkg"
-PRIVATE_PATH            = PREFIX+"/var/lib/portage"
-CACHE_PATH              = PREFIX+"/var/cache/edb"
+VDB_PATH                = EPREFIX+"/var/db/pkg"
+PRIVATE_PATH            = EPREFIX+"/var/lib/portage"
+CACHE_PATH              = EPREFIX+"/var/cache/edb"
 DEPCACHE_PATH           = CACHE_PATH+"/dep"
 
-USER_CONFIG_PATH        = PREFIX+"/etc/portage"
+USER_CONFIG_PATH        = EPREFIX+"/etc/portage"
 MODULES_FILE_PATH       = USER_CONFIG_PATH+"/modules"
 CUSTOM_PROFILE_PATH     = USER_CONFIG_PATH+"/profile"
 
 PORTAGE_BASE_PATH       = PORTAGE_BASE
 PORTAGE_BIN_PATH        = PORTAGE_BASE_PATH+"/bin"
 PORTAGE_PYM_PATH        = PORTAGE_BASE_PATH+"/pym"
-PROFILE_PATH            = PREFIX+"/etc/make.profile"
+PROFILE_PATH            = EPREFIX+"/etc/make.profile"
 LOCALE_DATA_PATH        = PORTAGE_BASE_PATH+"/locale"
 
 EBUILD_SH_BINARY        = PORTAGE_BIN_PATH+"/ebuild.sh"
@@ -37,7 +37,7 @@ MOVE_BINARY             = "mv"
 PRELINK_BINARY          = "prelink"
 
 WORLD_FILE              = PRIVATE_PATH + "/world"
-MAKE_CONF_FILE          = PREFIX+"/etc/make.conf"
+MAKE_CONF_FILE          = EPREFIX+"/etc/make.conf"
 MAKE_DEFAULTS_FILE      = PROFILE_PATH + "/make.defaults"
 DEPRECATED_PROFILE_FILE = PROFILE_PATH+"/deprecated"
 USER_VIRTUALS_FILE      = USER_CONFIG_PATH+"/virtuals"
index e4f2cdc8034742c06884b2418a683762405e328e..587f4515052b3d2dae81a353f5faec2e6c15ed70 100644 (file)
@@ -5,11 +5,11 @@
 
 # all vars that are to wind up in portage_const must have their name listed in __all__
 
-__all__ = ["PREFIX", "SYSCONFDIR", "PORTAGE_BASE", "portageuser", "portagegroup", "rootuser", "rootuid", "wheelgid"]
+__all__ = ["EPREFIX", "SYSCONFDIR", "PORTAGE_BASE", "portageuser", "portagegroup", "rootuser", "rootuid", "wheelgid"]
 
 from os import path
 
-PREFIX=path.normpath("@DOMAIN_PREFIX@")
+EPREFIX=path.normpath("@DOMAIN_PREFIX@")
 SYSCONFDIR=path.normpath("@sysconfdir@")
 PORTAGE_BASE=path.normpath("@PORTAGE_BASE@")
 portagegroup="@portagegroup@"