From: Fabian Groffen Date: Fri, 26 Mar 2010 08:28:22 +0000 (+0100) Subject: merged from master X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=5ea2a45e09782a154d8bd4ed2b6c59dfa29ffda6;p=portage.git merged from master --- 5ea2a45e09782a154d8bd4ed2b6c59dfa29ffda6 diff --cc bin/archive-conf index 62d4f5c4b,97c055df1..b34106bbc --- a/bin/archive-conf +++ b/bin/archive-conf @@@ -1,7 -1,6 +1,6 @@@ -#!/usr/bin/python +#!@PORTAGE_PYTHON@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ # # archive-conf -- save off a config file in the dispatch-conf archive dir diff --cc bin/banned-helper index 80faa1b9e,17ea9915d..c3242e30a --- a/bin/banned-helper +++ b/bin/banned-helper @@@ -1,7 -1,6 +1,6 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ # Copyright 2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ die "'${0##*/}' has been banned for EAPI '$EAPI'" exit 1 diff --cc bin/clean_locks index da5d099dc,8c4299c92..23a548598 --- a/bin/clean_locks +++ b/bin/clean_locks @@@ -1,7 -1,6 +1,6 @@@ -#!/usr/bin/python -O +#!@PORTAGE_PYTHON@ -O # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ from __future__ import print_function diff --cc bin/dispatch-conf index 5a72b9db7,43fe145ae..63c898b87 --- a/bin/dispatch-conf +++ b/bin/dispatch-conf @@@ -1,7 -1,6 +1,6 @@@ -#!/usr/bin/python -O +#!@PORTAGE_PYTHON@ -O # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ # # dispatch-conf -- Integrate modified configs, post-emerge diff --cc bin/dohtml.py index 3224dbbca,00258ec9e..b93cf84c8 --- a/bin/dohtml.py +++ b/bin/dohtml.py @@@ -1,7 -1,6 +1,6 @@@ -#!/usr/bin/python +#!@PORTAGE_PYTHON@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ # # Typical usage: diff --cc bin/ebuild index 30f75f246,3eaea9432..5f6977fed --- a/bin/ebuild +++ b/bin/ebuild @@@ -1,7 -1,6 +1,6 @@@ -#!/usr/bin/python -O +#!@PORTAGE_PYTHON@ -O # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ from __future__ import print_function diff --cc bin/ebuild-helpers/4/dodoc index 66d9a4367,0539de110..0639b3989 --- a/bin/ebuild-helpers/4/dodoc +++ b/bin/ebuild-helpers/4/dodoc @@@ -1,9 -1,8 +1,8 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh +source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh if [ $# -lt 1 ] ; then vecho "${0##*/}: at least one argument needed" 1>&2 diff --cc bin/ebuild-helpers/die index 51d2ef1a2,7e94bc721..da703a066 --- a/bin/ebuild-helpers/die +++ b/bin/ebuild-helpers/die @@@ -1,7 -1,6 +1,6 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ # Copyright 2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ # TODO: Eliminate race condition in signal delivery by using pipe or socket # IPC to guarantee that the ebuild process and all of its children (including diff --cc bin/ebuild-helpers/dobin index 54b0e1a62,821ce07c3..1bae1b5cb --- a/bin/ebuild-helpers/dobin +++ b/bin/ebuild-helpers/dobin @@@ -1,9 -1,8 +1,8 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh +source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh if [[ $# -lt 1 ]] ; then vecho "$0: at least one argument needed" 1>&2 diff --cc bin/ebuild-helpers/doconfd index 683bef29c,718c21ece..ed2e8eca9 --- a/bin/ebuild-helpers/doconfd +++ b/bin/ebuild-helpers/doconfd @@@ -1,7 -1,6 +1,6 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ if [[ $# -lt 1 ]] ; then echo "$0: at least one argument needed" 1>&2 diff --cc bin/ebuild-helpers/dodir index 62547090c,50e10f45a..d2747be52 --- a/bin/ebuild-helpers/dodir +++ b/bin/ebuild-helpers/dodir @@@ -1,6 -1,5 +1,5 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ -exec install -d ${DIROPTIONS} "${@/#/${D}/}" +exec install -d ${DIROPTIONS} "${@/#/${ED}/}" diff --cc bin/ebuild-helpers/dodoc index 0aff8a75f,796e96c65..6536fd405 --- a/bin/ebuild-helpers/dodoc +++ b/bin/ebuild-helpers/dodoc @@@ -1,10 -1,9 +1,9 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ if [ $# -lt 1 ] ; then - source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh + source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh vecho "${0##*/}: at least one argument needed" 1>&2 exit 1 fi diff --cc bin/ebuild-helpers/doenvd index 920681ea2,cfc70e2a5..a56cda2d6 --- a/bin/ebuild-helpers/doenvd +++ b/bin/ebuild-helpers/doenvd @@@ -1,7 -1,6 +1,6 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ if [[ $# -lt 1 ]] ; then echo "$0: at least one argument needed" 1>&2 diff --cc bin/ebuild-helpers/doexe index a99653dd1,fb1c5668b..8917fc4a3 --- a/bin/ebuild-helpers/doexe +++ b/bin/ebuild-helpers/doexe @@@ -1,9 -1,8 +1,8 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh +source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh if [[ $# -lt 1 ]] ; then echo "$0: at least one argument needed" 1>&2 diff --cc bin/ebuild-helpers/dohard index 33813c7e9,22704876c..c7c568ce2 --- a/bin/ebuild-helpers/dohard +++ b/bin/ebuild-helpers/dohard @@@ -1,7 -1,6 +1,6 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ if [[ $# -ne 2 ]] ; then echo "$0: two arguments needed" 1>&2 diff --cc bin/ebuild-helpers/dohtml index 572b1d7dc,cfcab2af0..21535cefb --- a/bin/ebuild-helpers/dohtml +++ b/bin/ebuild-helpers/dohtml @@@ -1,10 -1,9 +1,9 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ # Copyright 2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ -PORTAGE_BIN_PATH=${PORTAGE_BIN_PATH:-/usr/lib/portage/bin} -PORTAGE_PYM_PATH=${PORTAGE_PYM_PATH:-/usr/lib/portage/pym} +PORTAGE_BIN_PATH=${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin} +PORTAGE_PYM_PATH=${PORTAGE_PYM_PATH:-@PORTAGE_BASE@/pym} # Set EPYTHON variable as empty so that dohtml doesn't try # to use potentially unsupported version of Python. EPYTHON= PYTHONPATH=$PORTAGE_PYM_PATH${PYTHONPATH:+:}$PYTHONPATH \ diff --cc bin/ebuild-helpers/doinfo index a00885c0c,1aaf7fe4c..bae3e195a --- a/bin/ebuild-helpers/doinfo +++ b/bin/ebuild-helpers/doinfo @@@ -1,7 -1,6 +1,6 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ if [[ -z $1 ]] ; then vecho "${0##*/}: at least one argument needed" diff --cc bin/ebuild-helpers/doinitd index 527874dae,56c8396c8..f8edd1efe --- a/bin/ebuild-helpers/doinitd +++ b/bin/ebuild-helpers/doinitd @@@ -1,7 -1,6 +1,6 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ if [[ $# -lt 1 ]] ; then echo "$0: at least one argument needed" 1>&2 diff --cc bin/ebuild-helpers/doins index c5ac50dfa,64d2af23c..6030eb4c9 --- a/bin/ebuild-helpers/doins +++ b/bin/ebuild-helpers/doins @@@ -1,9 -1,8 +1,8 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh +source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh if [ $# -lt 1 ] ; then echo "${0##*/}: at least one argument needed" 1>&2 diff --cc bin/ebuild-helpers/dolib index 7c4e03186,794fdb64f..89047ab6f --- a/bin/ebuild-helpers/dolib +++ b/bin/ebuild-helpers/dolib @@@ -1,7 -1,6 +1,6 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ # Setup ABI cruft LIBDIR_VAR="LIBDIR_${ABI}" diff --cc bin/ebuild-helpers/dolib.a index f65f9423f,d2279dc9e..a7843ea3f --- a/bin/ebuild-helpers/dolib.a +++ b/bin/ebuild-helpers/dolib.a @@@ -1,7 -1,6 +1,6 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ exec env LIBOPTIONS="-m0644" \ dolib "$@" diff --cc bin/ebuild-helpers/dolib.so index 0732ca5d3,4bdbfabba..d37f40038 --- a/bin/ebuild-helpers/dolib.so +++ b/bin/ebuild-helpers/dolib.so @@@ -1,7 -1,6 +1,6 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ exec env LIBOPTIONS="-m0755" \ dolib "$@" diff --cc bin/ebuild-helpers/doman index e07bfa77a,85d5e2b4f..cc9563340 --- a/bin/ebuild-helpers/doman +++ b/bin/ebuild-helpers/doman @@@ -1,9 -1,8 +1,8 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh +source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh if [[ $# -lt 1 ]] ; then echo "$0: at least one argument needed" 1>&2 diff --cc bin/ebuild-helpers/domo index 8c8faf0fe,5a1e808e7..37cf1401b --- a/bin/ebuild-helpers/domo +++ b/bin/ebuild-helpers/domo @@@ -1,7 -1,6 +1,6 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ mynum=${#} if [ ${mynum} -lt 1 ] ; then diff --cc bin/ebuild-helpers/dosbin index a02a7fba4,8920d37e8..6f40fa406 --- a/bin/ebuild-helpers/dosbin +++ b/bin/ebuild-helpers/dosbin @@@ -1,7 -1,6 +1,6 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ if [[ $# -lt 1 ]] ; then echo "$0: at least one argument needed" 1>&2 diff --cc bin/ebuild-helpers/dosed index 63774be43,afc949ba5..40cf39a05 --- a/bin/ebuild-helpers/dosed +++ b/bin/ebuild-helpers/dosed @@@ -1,7 -1,6 +1,6 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ if [[ $# -lt 1 ]] ; then echo "!!! ${0##*/}: at least one argument needed" >&2 diff --cc bin/ebuild-helpers/dosym index 32043d247,52defbe85..0a138a490 --- a/bin/ebuild-helpers/dosym +++ b/bin/ebuild-helpers/dosym @@@ -1,7 -1,6 +1,6 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ if [[ $# -ne 2 ]] ; then echo "$0: two arguments needed" 1>&2 diff --cc bin/ebuild-helpers/ecompress index d6e3519d0,c6817ec3a..87999c3c2 --- a/bin/ebuild-helpers/ecompress +++ b/bin/ebuild-helpers/ecompress @@@ -1,9 -1,8 +1,8 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh +source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh if [[ -z $1 ]] ; then vecho "${0##*/}: at least one argument needed" 1>&2 diff --cc bin/ebuild-helpers/ecompressdir index 301a68fb0,5d7fdf04b..ffb60281b --- a/bin/ebuild-helpers/ecompressdir +++ b/bin/ebuild-helpers/ecompressdir @@@ -1,9 -1,8 +1,8 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh +source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh if [[ -z $1 ]] ; then vecho "${0##*/}: at least one argument needed" 1>&2 diff --cc bin/ebuild-helpers/elog index 628861579,a2303afab..3b3d5f618 --- a/bin/ebuild-helpers/elog +++ b/bin/ebuild-helpers/elog @@@ -1,8 -1,7 +1,7 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh +source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh ${0##*/} "$@" diff --cc bin/ebuild-helpers/emake index 450f7e148,97ea13660..d302091c1 --- a/bin/ebuild-helpers/emake +++ b/bin/ebuild-helpers/emake @@@ -1,7 -1,6 +1,6 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ # # emake: Supplies some default parameters to GNU make. At the moment the # only parameter supplied is -jN, where N is a number of diff --cc bin/ebuild-helpers/fowners index d71e62a8b,1097296da..99be171a1 --- a/bin/ebuild-helpers/fowners +++ b/bin/ebuild-helpers/fowners @@@ -1,7 -1,6 +1,6 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ # we can't prefix all arguments because # chown takes random options diff --cc bin/ebuild-helpers/fperms index 88782d173,6c236ab68..0450af128 --- a/bin/ebuild-helpers/fperms +++ b/bin/ebuild-helpers/fperms @@@ -1,7 -1,6 +1,6 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ # we can't prefix all arguments because # chmod takes random options diff --cc bin/ebuild-helpers/newbin index 925229329,fb2752a10..f9600f491 --- a/bin/ebuild-helpers/newbin +++ b/bin/ebuild-helpers/newbin @@@ -1,7 -1,6 +1,6 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ if [[ -z ${T} ]] || [[ -z ${2} ]] ; then echo "$0: Need two arguments, old file and new file" 1>&2 diff --cc bin/ebuild-helpers/newconfd index 877ddfdc1,94497d18d..bc485e46e --- a/bin/ebuild-helpers/newconfd +++ b/bin/ebuild-helpers/newconfd @@@ -1,7 -1,6 +1,6 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ if [[ -z ${T} ]] || [[ -z ${2} ]] ; then echo "$0: Need two arguments, old file and new file" 1>&2 diff --cc bin/ebuild-helpers/newdoc index 82e8c5ca8,1bc6a05f8..4705be614 --- a/bin/ebuild-helpers/newdoc +++ b/bin/ebuild-helpers/newdoc @@@ -1,7 -1,6 +1,6 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ if [[ -z ${T} ]] || [[ -z ${2} ]] ; then echo "$0: Need two arguments, old file and new file" 1>&2 diff --cc bin/ebuild-helpers/newenvd index 5628cc7d2,06b44050a..4c873e995 --- a/bin/ebuild-helpers/newenvd +++ b/bin/ebuild-helpers/newenvd @@@ -1,7 -1,6 +1,6 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ if [[ -z ${T} ]] || [[ -z ${2} ]] ; then echo "$0: Need two arguments, old file and new file" 1>&2 diff --cc bin/ebuild-helpers/newexe index 007bcdaa8,63dff5002..ee878427a --- a/bin/ebuild-helpers/newexe +++ b/bin/ebuild-helpers/newexe @@@ -1,7 -1,6 +1,6 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ if [[ -z ${T} ]] || [[ -z ${2} ]] ; then echo "$0: Need two arguments, old file and new file" 1>&2 diff --cc bin/ebuild-helpers/newinitd index 9f5ed7296,e74a6aaf6..2f8f14b4f --- a/bin/ebuild-helpers/newinitd +++ b/bin/ebuild-helpers/newinitd @@@ -1,7 -1,6 +1,6 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ if [[ -z ${T} ]] || [[ -z ${2} ]] ; then echo "$0: Need two arguments, old file and new file" 1>&2 diff --cc bin/ebuild-helpers/newins index d1756df95,1e11b432e..19ffbd73b --- a/bin/ebuild-helpers/newins +++ b/bin/ebuild-helpers/newins @@@ -1,7 -1,6 +1,6 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ if [[ -z ${T} ]] || [[ -z ${2} ]] ; then echo "$0: Need two arguments, old file and new file" 1>&2 diff --cc bin/ebuild-helpers/newlib.a index b84dc1295,120e8a257..f3de697c9 --- a/bin/ebuild-helpers/newlib.a +++ b/bin/ebuild-helpers/newlib.a @@@ -1,7 -1,6 +1,6 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ if [[ -z ${T} ]] || [[ -z ${2} ]] ; then echo "$0: Need two arguments, old file and new file" 1>&2 diff --cc bin/ebuild-helpers/newlib.so index 649f18895,2fbe59a1f..fad4efab3 --- a/bin/ebuild-helpers/newlib.so +++ b/bin/ebuild-helpers/newlib.so @@@ -1,7 -1,6 +1,6 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ if [[ -z ${T} ]] || [[ -z ${2} ]] ; then echo "$0: Need two arguments, old file and new file" 1>&2 diff --cc bin/ebuild-helpers/newman index 32e4486b4,758112c3d..7a586dbd7 --- a/bin/ebuild-helpers/newman +++ b/bin/ebuild-helpers/newman @@@ -1,7 -1,6 +1,6 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ if [[ -z ${T} ]] || [[ -z ${2} ]] ; then echo "$0: Need two arguments, old file and new file" 1>&2 diff --cc bin/ebuild-helpers/newsbin index 8240edf8a,bf1fbc8e6..c2d14d3f5 --- a/bin/ebuild-helpers/newsbin +++ b/bin/ebuild-helpers/newsbin @@@ -1,7 -1,6 +1,6 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ if [[ -z ${T} ]] || [[ -z ${2} ]] ; then echo "$0: Need two arguments, old file and new file" 1>&2 diff --cc bin/ebuild-helpers/portageq index 6dc5d7a7d,d1a1fb52b..575390091 --- a/bin/ebuild-helpers/portageq +++ b/bin/ebuild-helpers/portageq @@@ -1,10 -1,9 +1,9 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ # Copyright 2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ -PORTAGE_BIN_PATH=${PORTAGE_BIN_PATH:-/usr/lib/portage/bin} -PORTAGE_PYM_PATH=${PORTAGE_PYM_PATH:-/usr/lib/portage/pym} +PORTAGE_BIN_PATH=${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin} +PORTAGE_PYM_PATH=${PORTAGE_PYM_PATH:-@PORTAGE_BASE@/pym} # Set EPYTHON variable as empty so that dohtml doesn't try # to use potentially unsupported version of Python. EPYTHON= PYTHONPATH=$PORTAGE_PYM_PATH${PYTHONPATH:+:}$PYTHONPATH \ diff --cc bin/ebuild-helpers/prepall index 84e41f213,19db41552..bc3362e5c --- a/bin/ebuild-helpers/prepall +++ b/bin/ebuild-helpers/prepall @@@ -1,9 -1,8 +1,8 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh +source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh if hasq chflags $FEATURES ; then # Save all the file flags for restoration at the end of prepall. diff --cc bin/ebuild-helpers/prepalldocs index 3c0abbc5a,6705f5e79..4dda218b0 --- a/bin/ebuild-helpers/prepalldocs +++ b/bin/ebuild-helpers/prepalldocs @@@ -1,9 -1,8 +1,8 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh +source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh if [[ -n $1 ]] ; then vecho "${0##*/}: invalid usage; takes no arguments" 1>&2 diff --cc bin/ebuild-helpers/prepallinfo index 6bd2f619f,0d978034b..249e897a2 --- a/bin/ebuild-helpers/prepallinfo +++ b/bin/ebuild-helpers/prepallinfo @@@ -1,8 -1,9 +1,7 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh - -[[ ! -d ${D}usr/share/info ]] && exit 0 +[[ ! -d ${ED}usr/share/info ]] && exit 0 exec prepinfo diff --cc bin/ebuild-helpers/prepallman index b201115e0,f41bcb816..ea0485bf3 --- a/bin/ebuild-helpers/prepallman +++ b/bin/ebuild-helpers/prepallman @@@ -1,15 -1,14 +1,14 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh - ret=0 -find "${D}" -type d -name man > "${T}"/prepallman.filelist +[[ -d ${ED} ]] || exit ${ret} + +find "${ED}" -type d -name man > "${T}"/prepallman.filelist while read mandir ; do - mandir=${mandir#${D}} + mandir=${mandir#${ED}} prepman "${mandir%/man}" ((ret|=$?)) done < "${T}"/prepallman.filelist diff --cc bin/ebuild-helpers/prepallstrip index 6787f7a7d,ec12ce663..18ce4cc3c --- a/bin/ebuild-helpers/prepallstrip +++ b/bin/ebuild-helpers/prepallstrip @@@ -1,6 -1,5 +1,5 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ -exec prepstrip "${D}" +exec prepstrip "${ED}" diff --cc bin/ebuild-helpers/prepinfo index f294a3c60,1d8c7d1f0..d372c1bb8 --- a/bin/ebuild-helpers/prepinfo +++ b/bin/ebuild-helpers/prepinfo @@@ -1,17 -1,16 +1,16 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh +source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh if [[ -z $1 ]] ; then - infodir="/usr/share/info" + infodir="${EPREFIX}/usr/share/info" else - if [[ -d ${D}$1/share/info ]] ; then - infodir="$1/share/info" + if [[ -d ${ED}$1/share/info ]] ; then + infodir="${EPREFIX}$1/share/info" else - infodir="$1/info" + infodir="${EPREFIX}$1/info" fi fi diff --cc bin/ebuild-helpers/preplib index b22efe74d,76aabe64c..8b9e04d48 --- a/bin/ebuild-helpers/preplib +++ b/bin/ebuild-helpers/preplib @@@ -1,9 -1,8 +1,8 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh +source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh eqawarn "QA Notice: Deprecated call to 'preplib'" diff --cc bin/ebuild-helpers/prepman index ced966240,cfbcdd41a..78f91012b --- a/bin/ebuild-helpers/prepman +++ b/bin/ebuild-helpers/prepman @@@ -1,14 -1,13 +1,13 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh +source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh if [[ -z $1 ]] ; then - mandir="${D}usr/share/man" + mandir="${ED}usr/share/man" else - mandir="${D}$1/man" + mandir="${ED}$1/man" fi if [[ ! -d ${mandir} ]] ; then diff --cc bin/ebuild-helpers/prepstrip index 84095f434,2bd5bb102..959a085f4 --- a/bin/ebuild-helpers/prepstrip +++ b/bin/ebuild-helpers/prepstrip @@@ -1,9 -1,8 +1,8 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh +source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh banner=false SKIP_STRIP=false diff --cc bin/ebuild-helpers/sed index 72b218282,b21e8569c..8c979e92f --- a/bin/ebuild-helpers/sed +++ b/bin/ebuild-helpers/sed @@@ -1,7 -1,6 +1,6 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ # Copyright 2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ scriptpath=${BASH_SOURCE[0]} scriptname=${scriptpath##*/} diff --cc bin/ebuild.sh index 3e127ac3a,57ceb2848..5e7e9eb77 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@@ -1,10 -1,9 +1,9 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ -PORTAGE_BIN_PATH="${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}" -PORTAGE_PYM_PATH="${PORTAGE_PYM_PATH:-/usr/lib/portage/pym}" +PORTAGE_BIN_PATH="${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}" +PORTAGE_PYM_PATH="${PORTAGE_PYM_PATH:-@PORTAGE_BASE@/pym}" # Don't use sandbox's BASH_ENV for new shells because it does # 'source /etc/profile' which can interfere with the build diff --cc bin/egencache index 1385044e4,0766d99cb..a89445228 --- a/bin/egencache +++ b/bin/egencache @@@ -1,7 -1,6 +1,6 @@@ -#!/usr/bin/python +#!@PORTAGE_PYTHON@ # Copyright 2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ from __future__ import print_function diff --cc bin/emerge index 5321a9440,5d74bfa00..eaf6fc6af --- a/bin/emerge +++ b/bin/emerge @@@ -1,7 -1,6 +1,6 @@@ -#!/usr/bin/python +#!@PORTAGE_PYTHON@ # Copyright 2006-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ from __future__ import print_function diff --cc bin/emerge-webrsync index cb28cc988,9b2fcbb95..20681a8f6 --- a/bin/emerge-webrsync +++ b/bin/emerge-webrsync @@@ -1,7 -1,6 +1,6 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ # Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ # Author: Karl Trygve Kalleberg # Rewritten from the old, Perl-based emerge-webrsync script # Author: Alon Bar-Lev diff --cc bin/env-update index 73bb2b39e,8a69f2bb2..7455c5107 --- a/bin/env-update +++ b/bin/env-update @@@ -1,7 -1,6 +1,6 @@@ -#!/usr/bin/python -O +#!@PORTAGE_PYTHON@ -O # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ from __future__ import print_function diff --cc bin/etc-update index d927accfb,e282a307c..660bc0325 --- a/bin/etc-update +++ b/bin/etc-update @@@ -1,7 -1,6 +1,6 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ # Author Brandon Low # diff --cc bin/filter-bash-environment.py index 012756cb1,53f395ead..58a778433 --- a/bin/filter-bash-environment.py +++ b/bin/filter-bash-environment.py @@@ -1,7 -1,6 +1,6 @@@ -#!/usr/bin/python +#!@PORTAGE_PYTHON@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ import codecs import os, re, sys diff --cc bin/fixpackages index 391102e2c,5e1df7045..396f3aa97 --- a/bin/fixpackages +++ b/bin/fixpackages @@@ -1,7 -1,6 +1,6 @@@ -#!/usr/bin/python +#!@PORTAGE_PYTHON@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ from __future__ import print_function diff --cc bin/glsa-check index dcc635b47,d8745b062..8892a852d --- a/bin/glsa-check +++ b/bin/glsa-check @@@ -1,7 -1,6 +1,6 @@@ -#!/usr/bin/python +#!@PORTAGE_PYTHON@ # Copyright 2008-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ from __future__ import print_function diff --cc bin/isolated-functions.sh index d951c74b7,e7d0d4ee9..878fc7b7c mode 100755,100644..100644 --- a/bin/isolated-functions.sh +++ b/bin/isolated-functions.sh diff --cc bin/misc-functions.sh index 9ce59aac0,39d8ca3dc..ba2df1b4d mode 100644,100755..100644 --- a/bin/misc-functions.sh +++ b/bin/misc-functions.sh @@@ -1,7 -1,6 +1,6 @@@ -#!/bin/bash +#!@PORTAGE_BASH@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ # # Miscellaneous shell functions that make use of the ebuild env but don't need # to be included directly in ebuild.sh. diff --cc bin/portageq index 4efefe51d,5a4364fe8..3bbffcd3a --- a/bin/portageq +++ b/bin/portageq @@@ -1,7 -1,6 +1,6 @@@ -#!/usr/bin/python -O +#!@PORTAGE_PYTHON@ -O # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ from __future__ import print_function diff --cc bin/quickpkg index 208a88aef,0dfaa55fd..4d8b5bfb8 --- a/bin/quickpkg +++ b/bin/quickpkg @@@ -1,7 -1,6 +1,6 @@@ -#!/usr/bin/python +#!@PORTAGE_PYTHON@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ from __future__ import print_function diff --cc bin/regenworld index dffdcc1f0,12692daf4..03815858a --- a/bin/regenworld +++ b/bin/regenworld @@@ -1,7 -1,6 +1,6 @@@ -#!/usr/bin/python +#!@PORTAGE_PYTHON@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ # NOTE: this file does not respect ROOT diff --cc bin/repoman index b43f90297,ffc4c948b..813a812a1 --- a/bin/repoman +++ b/bin/repoman @@@ -1,7 -1,6 +1,6 @@@ -#!/usr/bin/python -O +#!@PORTAGE_PYTHON@ -O # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ # Next to do: dep syntax checking in mask files # Then, check to make sure deps are satisfiable (to avoid "can't find match for" problems) diff --cc bin/xpak-helper.py index a9b24a62d,4766d990d..43ed18b01 --- a/bin/xpak-helper.py +++ b/bin/xpak-helper.py @@@ -1,7 -1,6 +1,6 @@@ -#!/usr/bin/python +#!@PORTAGE_PYTHON@ # Copyright 2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ import optparse import sys diff --cc pym/_emerge/AtomArg.py index 71cc22273,244ea28e7..d9485d7fb --- a/pym/_emerge/AtomArg.py +++ b/pym/_emerge/AtomArg.py @@@ -1,18 -1,14 +1,17 @@@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ from _emerge.DependencyArg import DependencyArg -try: - import portage -except ImportError: - from os import path as osp - import sys - sys.path.insert(0, osp.join(osp.dirname(osp.dirname(osp.realpath(__file__))), "pym")) - import portage + +# for an explanation on this logic, see pym/_emerge/__init__.py +import os +import sys +if os.environ.__contains__("PORTAGE_PYTHONPATH"): + sys.path.insert(0, os.environ["PORTAGE_PYTHONPATH"]) +else: + sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))), "pym")) +import portage + class AtomArg(DependencyArg): def __init__(self, atom=None, **kwargs): DependencyArg.__init__(self, **kwargs) diff --cc pym/_emerge/BinpkgExtractorAsync.py index 45af54136,a4941fccf..510c46536 --- a/pym/_emerge/BinpkgExtractorAsync.py +++ b/pym/_emerge/BinpkgExtractorAsync.py @@@ -1,16 -1,9 +1,15 @@@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ from _emerge.SpawnProcess import SpawnProcess -import portage +# for an explanation on this logic, see pym/_emerge/__init__.py import os +import sys +if os.environ.__contains__("PORTAGE_PYTHONPATH"): + sys.path.insert(0, os.environ["PORTAGE_PYTHONPATH"]) +else: + sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))), "pym")) +import portage class BinpkgExtractorAsync(SpawnProcess): diff --cc pym/_emerge/Blocker.py index c9815d71a,04b6bb1d4..0cdc3e6b3 --- a/pym/_emerge/Blocker.py +++ b/pym/_emerge/Blocker.py @@@ -1,16 -1,14 +1,15 @@@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ from _emerge.Task import Task -try: - import portage -except ImportError: - from os import path as osp - import sys - sys.path.insert(0, osp.join(osp.dirname(osp.dirname(osp.realpath(__file__))), "pym")) - import portage +# for an explanation on this logic, see pym/_emerge/__init__.py +import os +import sys +if os.environ.__contains__("PORTAGE_PYTHONPATH"): + sys.path.insert(0, os.environ["PORTAGE_PYTHONPATH"]) +else: + sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))), "pym")) +import portage class Blocker(Task): __hash__ = Task.__hash__ diff --cc pym/portage/const.py index fd26f486e,1450fe2e8..82953ce5b --- a/pym/portage/const.py +++ b/pym/portage/const.py @@@ -1,21 -1,9 +1,20 @@@ # portage: Constants # Copyright 1998-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ +# =========================================================================== +# autotool supplied constants. +# =========================================================================== +from portage.const_autotool import * + import os +# save the original prefix +BPREFIX = EPREFIX +# pick up EPREFIX from the environment if set +if "EPREFIX" in os.environ: + EPREFIX = os.path.normpath(os.environ["EPREFIX"]) + # =========================================================================== # START OF CONSTANTS -- START OF CONSTANTS -- START OF CONSTANTS -- START OF # =========================================================================== @@@ -73,12 -59,15 +72,15 @@@ PORTAGE_PYM_PATH = PORTAGE_BASE LOCALE_DATA_PATH = PORTAGE_BASE_PATH + "/locale" # FIXME: not used EBUILD_SH_BINARY = PORTAGE_BIN_PATH + "/ebuild.sh" MISC_SH_BINARY = PORTAGE_BIN_PATH + "/misc-functions.sh" -SANDBOX_BINARY = "/usr/bin/sandbox" -FAKEROOT_BINARY = "/usr/bin/fakeroot" -BASH_BINARY = "/bin/bash" -MOVE_BINARY = "/bin/mv" -PRELINK_BINARY = "/usr/sbin/prelink" +SANDBOX_BINARY = BPREFIX + "/usr/bin/sandbox" +FAKEROOT_BINARY = BPREFIX + "/usr/bin/fakeroot" +BASH_BINARY = PORTAGE_BASH +MOVE_BINARY = PORTAGE_MV +PRELINK_BINARY = EPREFIX + "/usr/sbin/prelink" + PORTAGE_GROUPNAME = os.environ.get("PORTAGE_GROUPNAME", 'portage') + PORTAGE_USERNAME = os.environ.get("PORTAGE_USERNAME", 'portage') + INVALID_ENV_FILE = "/etc/spork/is/not/valid/profile.env" REPO_NAME_FILE = "repo_name" REPO_NAME_LOC = "profiles" + "/" + REPO_NAME_FILE diff --cc pym/portage/data.py index f2e241404,ff23dbe00..c0278626b --- a/pym/portage/data.py +++ b/pym/portage/data.py @@@ -1,10 -1,9 +1,9 @@@ # data.py -- Calculated/Discovered Data Values # Copyright 1998-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ import os, sys, pwd, grp, platform - from portage.const import rootuid, portageuser, portagegroup, EPREFIX -from portage.const import PORTAGE_GROUPNAME, PORTAGE_USERNAME ++from portage.const import PORTAGE_GROUPNAME, PORTAGE_USERNAME ,rootuid, EPREFIX import portage portage.proxy.lazyimport.lazyimport(globals(), diff --cc pym/portage/dbapi/vartree.py index bf7ccd807,38622df45..bc7785818 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@@ -1,9 -1,7 +1,8 @@@ # Copyright 1998-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ __all__ = ["PreservedLibsRegistry", "LinkageMap", + "LinkageMapMachO", "LinkageMapPeCoff", "LinkageMapXCoff" "vardbapi", "vartree", "dblink"] + \ ["write_contents", "tar_contents"] diff --cc pym/portage/sets/files.py index de606d675,2380fc546..dad253dc4 --- a/pym/portage/sets/files.py +++ b/pym/portage/sets/files.py @@@ -1,7 -1,7 +1,6 @@@ # Copyright 2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 - # $Id$ -import errno import re from itertools import chain