properly rename old PORTAGE_PYTHON to PREFIX_PORTAGE_PYTHON
authorFabian Groffen <grobian@gentoo.org>
Mon, 13 Dec 2010 21:53:30 +0000 (22:53 +0100)
committerFabian Groffen <grobian@gentoo.org>
Mon, 13 Dec 2010 21:53:30 +0000 (22:53 +0100)
30 files changed:
acinclude.m4
bin/archive-conf
bin/binhost-snapshot
bin/check-implicit-pointer-usage.py
bin/clean_locks
bin/dispatch-conf
bin/dohtml.py
bin/ebuild
bin/ebuild-helpers/dohtml
bin/ebuild-helpers/portageq
bin/ebuild-ipc
bin/ebuild-ipc.py
bin/ebuild.sh
bin/egencache
bin/emaint
bin/emerge
bin/env-update
bin/filter-bash-environment.py
bin/fixpackages
bin/glsa-check
bin/misc-functions.sh
bin/portageq
bin/quickpkg
bin/regenworld
bin/repoman
bin/xpak-helper.py
pym/Makefile.in
runtests.sh
subst-install.in
tarball.sh

index 47c537fc99440115f0d9fa5786d2b791f81bd1f0..5bf24daeb478dc082ff7c54c6cb0e5ca558722f8 100644 (file)
@@ -16,19 +16,17 @@ dnl GENTOO_PATH_PYTHON([minimum-version], [path])
 dnl author: Fabian Groffen <grobian a gentoo.org>
 AC_DEFUN([GENTOO_PATH_PYTHON],
 [
-  AC_PATH_PROG([HERE_PORTAGE_PYTHON], [python], no, $2)
-  dnl Portage's ebuild.sh defines PORTAGE_PYTHON itself now :(
-  PORTAGE_PYTHON="$HERE_PORTAGE_PYTHON"
+  AC_PATH_PROG([PREFIX_PORTAGE_PYTHON], [python], no, $2)
 
   dnl is is there at all?
-  if test "$PORTAGE_PYTHON" = "no" ; then
+  if test "$PREFIX_PORTAGE_PYTHON" = "no" ; then
     AC_MSG_ERROR([no python found in your path])
   fi
 
   dnl is it the version we want?
-  ver=`$PORTAGE_PYTHON -c 'import sys; print sys.version.split(" ")[[0]]'`
-  AC_MSG_CHECKING([whether $PORTAGE_PYTHON $ver >= $1])
-  cmp=`$PORTAGE_PYTHON -c 'import sys; print sys.version.split(" ")[[0]] >= "$1"'`
+  ver=`$PREFIX_PORTAGE_PYTHON -c 'import sys; print sys.version.split(" ")[[0]]'`
+  AC_MSG_CHECKING([whether $PREFIX_PORTAGE_PYTHON $ver >= $1])
+  cmp=`$PREFIX_PORTAGE_PYTHON -c 'import sys; print sys.version.split(" ")[[0]] >= "$1"'`
   if test "$cmp" = "True" ; then
     AC_MSG_RESULT([yes])
   else
index aca1ac37a4485877e82891254764d6eb49a901bd..ff46444883113e7072818b4eaa4adad1aa004904 100755 (executable)
@@ -1,4 +1,4 @@
-#!@PORTAGE_PYTHON@
+#!@PREFIX_PORTAGE_PYTHON@
 # Copyright 1999-2006 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
index 64e33a14e40073ab4903b500a43dcf1c695e0601..662b027e26c487af29ebb13f7b6b80e854a53d36 100755 (executable)
@@ -1,4 +1,4 @@
-#!@PORTAGE_PYTHON@
+#!@PREFIX_PORTAGE_PYTHON@
 # Copyright 2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
index f261e2ef5f6b6e1de0f2f888ec883189bd2c99b8..710a0b8df71a3e176239418881f8f46d06feda1e 100755 (executable)
@@ -1,4 +1,4 @@
-#!@PORTAGE_PYTHON@ -O
+#!@PREFIX_PORTAGE_PYTHON@ -O
 
 # Ripped from HP and updated from Debian
 # Update by Gentoo to support unicode output
index 23a5485984e87e317db58d74be2adcbc75d93b2a..c97794facde5f81eb947c5b135447067188fdb65 100755 (executable)
@@ -1,4 +1,4 @@
-#!@PORTAGE_PYTHON@ -O
+#!@PREFIX_PORTAGE_PYTHON@ -O
 # Copyright 1999-2006 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
index 0cd4b0e0312781aa7101799d8cdb5295a1675c85..6ce255ed56ea6f4e8ed4ccd431eabde966a65f21 100755 (executable)
@@ -1,4 +1,4 @@
-#!@PORTAGE_PYTHON@ -O
+#!@PREFIX_PORTAGE_PYTHON@ -O
 # Copyright 1999-2006 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
index b93cf84c8319e88df7bbbcae5f7f6f6973aac7d9..bf9bcc836f8065d277155bbdddb63533a49549ab 100755 (executable)
@@ -1,4 +1,4 @@
-#!@PORTAGE_PYTHON@
+#!@PREFIX_PORTAGE_PYTHON@
 # Copyright 1999-2006 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
index 7745f4f5d922a991f6ec3f05edc63591fe60c860..e4da02c40c2d4d2043d256ba8fd5f9b4701190ab 100755 (executable)
@@ -1,4 +1,4 @@
-#!@PORTAGE_PYTHON@ -O
+#!@PREFIX_PORTAGE_PYTHON@ -O
 # Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
index b5c73e30a22347f2f9f981809ae627bfb744e26f..b3a3c7a1eb1c417847b63030539ec352e9fc742a 100755 (executable)
@@ -7,7 +7,7 @@ source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh
 PORTAGE_BIN_PATH=${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}
 PORTAGE_PYM_PATH=${PORTAGE_PYM_PATH:-@PORTAGE_BASE@/pym}
 PYTHONPATH=$PORTAGE_PYM_PATH${PYTHONPATH:+:}$PYTHONPATH \
-       "${PORTAGE_PYTHON:-@PORTAGE_PYTHON@}" "$PORTAGE_BIN_PATH/dohtml.py" "$@"
+       "${PORTAGE_PYTHON:-@PREFIX_PORTAGE_PYTHON@}" "$PORTAGE_BIN_PATH/dohtml.py" "$@"
 
 ret=$?
 [[ $ret -ne 0 ]] && helpers_die "${0##*/} failed"
index 39ccb09dd4b804075b22b02667bcaeb57f980858..1afd79ae4f433d0a82a3dc936f4c81b2469b0319 100755 (executable)
@@ -5,4 +5,4 @@
 PORTAGE_BIN_PATH=${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}
 PORTAGE_PYM_PATH=${PORTAGE_PYM_PATH:-@PORTAGE_BASE@/pym}
 PYTHONPATH=$PORTAGE_PYM_PATH${PYTHONPATH:+:}$PYTHONPATH \
-       exec "${PORTAGE_PYTHON:-@PORTAGE_PYTHON@}" "$PORTAGE_BIN_PATH/portageq" "$@"
+       exec "${PORTAGE_PYTHON:-@PREFIX_PORTAGE_PYTHON@}" "$PORTAGE_BIN_PATH/portageq" "$@"
index 5bd7da1e2b656c2cb697bc9c352d8d855e6a4298..5b9ad53b3ebe5a8c5dc517e8af5aa31d8fc2fda1 100755 (executable)
@@ -5,4 +5,4 @@
 PORTAGE_BIN_PATH=${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}
 PORTAGE_PYM_PATH=${PORTAGE_PYM_PATH:-/usr/lib/portage/pym}
 PYTHONPATH=$PORTAGE_PYM_PATH${PYTHONPATH:+:}$PYTHONPATH \
-       exec "${PORTAGE_PYTHON:-@PORTAGE_PYTHON@}" "$PORTAGE_BIN_PATH/ebuild-ipc.py" "$@"
+       exec "${PORTAGE_PYTHON:-@PREFIX_PORTAGE_PYTHON@}" "$PORTAGE_BIN_PATH/ebuild-ipc.py" "$@"
index 54261398e41b69c6e232d7368b9548eed4e1d751..786f4a7668b5426057760f6be4d735f15a05e630 100755 (executable)
@@ -1,4 +1,4 @@
-#!@PORTAGE_PYTHON@
+#!@PREFIX_PORTAGE_PYTHON@
 # Copyright 2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 #
index af0f0eefb1fa02d193a84886eb87068b0d020b93..693ae948580f6a99796e3709e25f7520cbf3ae95 100755 (executable)
@@ -209,7 +209,7 @@ portageq() {
        fi
 
        PYTHONPATH=${PORTAGE_PYM_PATH}${PYTHONPATH:+:}${PYTHONPATH} \
-       "${PORTAGE_PYTHON:-@PORTAGE_PYTHON@}" "${PORTAGE_BIN_PATH}/portageq" "$@"
+       "${PORTAGE_PYTHON:-@PREFIX_PORTAGE_PYTHON@}" "${PORTAGE_BIN_PATH}/portageq" "$@"
 }
 
 
@@ -1813,7 +1813,7 @@ filter_readonly_variables() {
                "
        fi
 
-       "${PORTAGE_PYTHON:-@PORTAGE_PYTHON@}" "${PORTAGE_BIN_PATH}"/filter-bash-environment.py "${filtered_vars}" || die "filter-bash-environment.py failed"
+       "${PORTAGE_PYTHON:-@PREFIX_PORTAGE_PYTHON@}" "${PORTAGE_BIN_PATH}"/filter-bash-environment.py "${filtered_vars}" || die "filter-bash-environment.py failed"
 }
 
 # @FUNCTION: preprocess_ebuild_env
index a78ff97a0eb050257162a1ccff0ef2cfb6f11ce7..0e763279c4b10c41c683d5dc4e348099a2bb9d02 100755 (executable)
@@ -1,4 +1,4 @@
-#!@PORTAGE_PYTHON@
+#!@PREFIX_PORTAGE_PYTHON@
 # Copyright 2009-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
index a71b56b86b4fc1ba1e6c3a8fdf3c15ef8e3f3549..6d68cb0b225c51e6c1904c382f2d347159f5a2e3 100755 (executable)
@@ -1,4 +1,4 @@
-#!@PORTAGE_PYTHON@ -O
+#!@PREFIX_PORTAGE_PYTHON@ -O
 # vim: noet :
 
 from __future__ import print_function
index eaf6fc6af2df91bd5ceeddd37d2dff742cccf211..8d56c09295a63320841a1ddbf057d953bd46c94f 100755 (executable)
@@ -1,4 +1,4 @@
-#!@PORTAGE_PYTHON@
+#!@PREFIX_PORTAGE_PYTHON@
 # Copyright 2006-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
index 7455c51077ac9343e83bd8acfb679cf8e39efec9..32c251e0201a13c3b4d2722558d5cd079bec7a90 100755 (executable)
@@ -1,4 +1,4 @@
-#!@PORTAGE_PYTHON@ -O
+#!@PREFIX_PORTAGE_PYTHON@ -O
 # Copyright 1999-2006 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
index 9a2d845e96ecf49c6cbc0664d414a46f08cd5786..126e4801a93addade6cff436ff453a024097befb 100755 (executable)
@@ -1,4 +1,4 @@
-#!@PORTAGE_PYTHON@
+#!@PREFIX_PORTAGE_PYTHON@
 # Copyright 1999-2007 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
index 396f3aa97ed19790aa07a64249ec8f8b29185eaa..a60852a023c4b9cbae60b10a07f7a03108b5a786 100755 (executable)
@@ -1,4 +1,4 @@
-#!@PORTAGE_PYTHON@
+#!@PREFIX_PORTAGE_PYTHON@
 # Copyright 1999-2006 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
index 8892a852d8b03cd06bdf2e5bede10841f3062bb1..64209ab825b99704ca40e753e2ecd90175206ef0 100755 (executable)
@@ -1,4 +1,4 @@
-#!@PORTAGE_PYTHON@
+#!@PREFIX_PORTAGE_PYTHON@
 # Copyright 2008-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
index 6dbc2f423689adaa6a96811b86164075c8760f96..dc54f811fc4e66aeebdd52c22fb89af32348f171 100644 (file)
@@ -667,7 +667,7 @@ install_qa_check_misc() {
                [[ $PORTAGE_LOG_FILE = *.gz ]] && cat_cmd=zcat
                [[ $reset_debug = 1 ]] && set -x
                f=$($cat_cmd "${PORTAGE_LOG_FILE}" | \
-                       "${PORTAGE_PYTHON:-@PORTAGE_PYTHON@}" "$PORTAGE_BIN_PATH"/check-implicit-pointer-usage.py || die "check-implicit-pointer-usage.py failed")
+                       "${PORTAGE_PYTHON:-@PREFIX_PORTAGE_PYTHON@}" "$PORTAGE_BIN_PATH"/check-implicit-pointer-usage.py || die "check-implicit-pointer-usage.py failed")
                if [[ -n ${f} ]] ; then
 
                        # In the future this will be a forced "die". In preparation,
@@ -1604,7 +1604,7 @@ dyn_package() {
                $PORTAGE_BZIP2_COMMAND -c > "$PORTAGE_BINPKG_TMPFILE"
        assert "failed to pack binary package: '$PORTAGE_BINPKG_TMPFILE'"
        PYTHONPATH=${PORTAGE_PYM_PATH}${PYTHONPATH:+:}${PYTHONPATH} \
-               "${PORTAGE_PYTHON:-@PORTAGE_PYTHON@}" "$PORTAGE_BIN_PATH"/xpak-helper.py recompose \
+               "${PORTAGE_PYTHON:-@PREFIX_PORTAGE_PYTHON@}" "$PORTAGE_BIN_PATH"/xpak-helper.py recompose \
                "$PORTAGE_BINPKG_TMPFILE" "$PORTAGE_BUILDDIR/build-info"
        if [ $? -ne 0 ]; then
                rm -f "${PORTAGE_BINPKG_TMPFILE}"
index e7153f4ad60dadb67b81223bb47ac58d8310acfa..1fa290d74469bc0cd4df533accb032cf441e0976 100755 (executable)
@@ -1,4 +1,4 @@
-#!@PORTAGE_PYTHON@ -O
+#!@PREFIX_PORTAGE_PYTHON@ -O
 # Copyright 1999-2006 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
index f9086c77e211a4712393cb16ae1668c5355eee39..258589e39dc61cc17de00001e818ca661fe6e44c 100755 (executable)
@@ -1,4 +1,4 @@
-#!@PORTAGE_PYTHON@
+#!@PREFIX_PORTAGE_PYTHON@
 # Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
index cb9b551f39790b89be6396e083cf3b7aa0a08072..e0e9774c41e209a2d65c5253439fba5507fa1dd2 100755 (executable)
@@ -1,4 +1,4 @@
-#!@PORTAGE_PYTHON@
+#!@PREFIX_PORTAGE_PYTHON@
 # Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
index beca5e06d348bc3c60aae2f5e610074fe58ec38e..ac4d428ba6bb6dd11ea2aaac1161465c0f623c03 100755 (executable)
@@ -1,4 +1,4 @@
-#!@PORTAGE_PYTHON@ -O
+#!@PREFIX_PORTAGE_PYTHON@ -O
 # Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
index 43ed18b01d9c53886d88b48259da55d0ba3e14d7..4d096cc6b83b76f29ce4bd4ff25dc5e25070aff5 100755 (executable)
@@ -1,4 +1,4 @@
-#!@PORTAGE_PYTHON@
+#!@PREFIX_PORTAGE_PYTHON@
 # Copyright 2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
index 7e79b67fe974e751027277934e2e36b5ff679a18..aa903bb42b75cb4d491220f4f6b1733f82bdf86e 100644 (file)
@@ -4,7 +4,7 @@ prefix = @prefix@
 exec_prefix = @exec_prefix@
 sysconfdir = @sysconfdir@
 libdir = @libdir@
-PYTHON = @PORTAGE_PYTHON@
+PYTHON = @PREFIX_PORTAGE_PYTHON@
 
 srcdir=@srcdir@
 top_builddir=@top_builddir@
index 31910d65d7b78ba5ab712035e66bb5a90240679e..f3d91a92682ba6917818867370333bb90a5e9c9e 100755 (executable)
@@ -24,9 +24,9 @@ trap interrupted SIGINT
 
 exit_status="0"
 for version in ${PYTHON_VERSIONS}; do
-       if [[ -x @PORTAGE_PYTHON@${version} ]]; then
+       if [[ -x @PREFIX_PORTAGE_PYTHON@${version} ]]; then
                echo -e "${GOOD}Testing with Python ${version}...${NORMAL}"
-               if ! @PORTAGE_PYTHON@${version} pym/portage/tests/runTests; then
+               if ! @PREFIX_PORTAGE_PYTHON@${version} pym/portage/tests/runTests; then
                        echo -e "${BAD}Testing with Python ${version} failed${NORMAL}"
                        exit_status="1"
                fi
index 24dc4fa7ba95eea95ce2ac3eb96a8c4e3b426324..3ae07c1f5008adeafff720ab247e0972ae6e3c06 100644 (file)
@@ -31,7 +31,7 @@ sedexp=(
        -e "s,${at}PORTAGE_FIND${at},@PORTAGE_FIND@,g"
        -e "s,${at}PORTAGE_GREP${at},@PORTAGE_GREP@,g"
        -e "s,${at}PORTAGE_MV${at},@PORTAGE_MV@,g"
-       -e "s,${at}PORTAGE_PYTHON${at},@PORTAGE_PYTHON@,g"
+       -e "s,${at}PORTAGE_PYTHON${at},@PREFIX_PORTAGE_PYTHON@,g"
        -e "s,${at}PORTAGE_RM${at},@PORTAGE_RM@,g"
        -e "s,${at}PORTAGE_SED${at},@PORTAGE_SED@,g"
        -e "s,${at}PORTAGE_WGET${at},@PORTAGE_WGET@,g"
index 97237482798d2eeb0099742ef7eeb23e8722819c..fd58e3ba84cc1a4f39b2b70ec662ba36b0e5cf40 100755 (executable)
@@ -15,7 +15,7 @@ export DEST="${TMP}/${PKG}-${V}"
 
 ./tabcheck.py $(
        find ./ -name .git -o -name .hg -prune -o -type f ! -name '*.py' -print \
-               | xargs grep -l "#\!@PORTAGE_PYTHON@"
+               | xargs grep -l "#\!@PREFIX_PORTAGE_PYTHON@"
        find ./ -name .git -o -name .hg -prune -o -type f -name '*.py' -print
 )