From e67ad7432d203db5b443c949ba43bd91c096bc46 Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Sat, 25 Apr 2009 09:07:18 +0000 Subject: [PATCH] - consistently use @PORTAGE_BASE@ instead of path - fix for Prefix by not calling /bin/bash - fix for Prefix by not defaulting to non-Prefixed paths - fix second export PATH for Prefix, make note on difference with trunk svn path=/main/branches/prefix/; revision=13396 --- bin/banned-helper | 2 +- bin/ebuild-helpers/3/dodoc | 6 +++--- bin/ebuild-helpers/die | 4 ++-- bin/ebuild-helpers/dobin | 2 +- bin/ebuild-helpers/dodoc | 2 +- bin/ebuild-helpers/doexe | 2 +- bin/ebuild-helpers/doins | 2 +- bin/ebuild-helpers/doman | 2 +- bin/ebuild-helpers/ecompress | 2 +- bin/ebuild-helpers/ecompressdir | 2 +- bin/ebuild-helpers/elog | 2 +- bin/ebuild.sh | 6 +++++- 12 files changed, 19 insertions(+), 15 deletions(-) diff --git a/bin/banned-helper b/bin/banned-helper index aa962a1f6..80faa1b9e 100755 --- a/bin/banned-helper +++ b/bin/banned-helper @@ -1,4 +1,4 @@ -#!/bin/bash +#!@PORTAGE_BASH@ # Copyright 2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Id$ diff --git a/bin/ebuild-helpers/3/dodoc b/bin/ebuild-helpers/3/dodoc index 4e7c934ab..66d9a4367 100755 --- a/bin/ebuild-helpers/3/dodoc +++ b/bin/ebuild-helpers/3/dodoc @@ -1,16 +1,16 @@ -#!/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 exit 1 fi -dir="${D}usr/share/doc/${PF}/${_E_DOCDESTTREE_}" +dir="${ED}usr/share/doc/${PF}/${_E_DOCDESTTREE_}" if [ ! -d "${dir}" ] ; then install -d "${dir}" fi diff --git a/bin/ebuild-helpers/die b/bin/ebuild-helpers/die index e871bd9fe..51d2ef1a2 100755 --- a/bin/ebuild-helpers/die +++ b/bin/ebuild-helpers/die @@ -1,4 +1,4 @@ -#!/bin/bash +#!@PORTAGE_BASH@ # Copyright 2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Id$ @@ -7,6 +7,6 @@ # IPC to guarantee that the ebuild process and all of its children (including # this helper) are killed immediately, ensuring that "false success" is # impossible. -source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh +source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh die "$@" exit 1 diff --git a/bin/ebuild-helpers/dobin b/bin/ebuild-helpers/dobin index 7d0455e08..54b0e1a62 100755 --- a/bin/ebuild-helpers/dobin +++ b/bin/ebuild-helpers/dobin @@ -3,7 +3,7 @@ # Distributed under the terms of the GNU General Public License v2 # $Id$ -source "${PORTAGE_BIN_PATH:-${EPREFIX}/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 --git a/bin/ebuild-helpers/dodoc b/bin/ebuild-helpers/dodoc index 8314e1ba1..0aff8a75f 100755 --- a/bin/ebuild-helpers/dodoc +++ b/bin/ebuild-helpers/dodoc @@ -4,7 +4,7 @@ # $Id$ if [ $# -lt 1 ] ; then - source "${PORTAGE_BIN_PATH:-${EPREFIX}/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 --git a/bin/ebuild-helpers/doexe b/bin/ebuild-helpers/doexe index 86f145720..a99653dd1 100755 --- a/bin/ebuild-helpers/doexe +++ b/bin/ebuild-helpers/doexe @@ -3,7 +3,7 @@ # Distributed under the terms of the GNU General Public License v2 # $Id$ -source "${PORTAGE_BIN_PATH:-${EPREFIX}/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 --git a/bin/ebuild-helpers/doins b/bin/ebuild-helpers/doins index 48040bdc9..ae91ff5ae 100755 --- a/bin/ebuild-helpers/doins +++ b/bin/ebuild-helpers/doins @@ -3,7 +3,7 @@ # Distributed under the terms of the GNU General Public License v2 # $Id$ -source "${PORTAGE_BIN_PATH:-${EPREFIX}/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 --git a/bin/ebuild-helpers/doman b/bin/ebuild-helpers/doman index dfe1f762c..a68219915 100755 --- a/bin/ebuild-helpers/doman +++ b/bin/ebuild-helpers/doman @@ -3,7 +3,7 @@ # Distributed under the terms of the GNU General Public License v2 # $Id$ -source "${PORTAGE_BIN_PATH:-${EPREFIX}/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 --git a/bin/ebuild-helpers/ecompress b/bin/ebuild-helpers/ecompress index 7158bb9c0..4b269d501 100755 --- a/bin/ebuild-helpers/ecompress +++ b/bin/ebuild-helpers/ecompress @@ -3,7 +3,7 @@ # Distributed under the terms of the GNU General Public License v2 # $Id$ -source "${PORTAGE_BIN_PATH:-${EPREFIX}/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 --git a/bin/ebuild-helpers/ecompressdir b/bin/ebuild-helpers/ecompressdir index 35534c996..273de957f 100755 --- a/bin/ebuild-helpers/ecompressdir +++ b/bin/ebuild-helpers/ecompressdir @@ -3,7 +3,7 @@ # Distributed under the terms of the GNU General Public License v2 # $Id$ -source "${PORTAGE_BIN_PATH:-${EPREFIX}/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 --git a/bin/ebuild-helpers/elog b/bin/ebuild-helpers/elog index 2e2674b52..628861579 100755 --- a/bin/ebuild-helpers/elog +++ b/bin/ebuild-helpers/elog @@ -3,6 +3,6 @@ # Distributed under the terms of the GNU General Public License v2 # $Id$ -source "${PORTAGE_BIN_PATH:-${EPREFIX}/usr/lib/portage/bin}"/isolated-functions.sh +source "${PORTAGE_BIN_PATH:-@PORTAGE_BASE@/bin}"/isolated-functions.sh ${0##*/} "$@" diff --git a/bin/ebuild.sh b/bin/ebuild.sh index cee668e06..b872b5e5a 100755 --- a/bin/ebuild.sh +++ b/bin/ebuild.sh @@ -71,6 +71,8 @@ unalias -a # Unset some variables that break things. unset GZIP BZIP BZIP2 CDPATH GREP_OPTIONS GREP_COLOR GLOBIGNORE +#export PATH="/usr/local/sbin:/sbin:/usr/sbin:$PORTAGE_BIN_PATH/ebuild-helpers:/usr/local/bin:/bin:/usr/bin:${ROOTPATH}" +# PREFIX: we deviate in path order, should we split up DEFAULT_PATH? export PATH="${DEFAULT_PATH}:$PORTAGE_BIN_PATH/ebuild-helpers:${ROOTPATH}" [ ! -z "$PREROOTPATH" ] && export PATH="${PREROOTPATH%%:}:$PATH" @@ -1923,7 +1925,9 @@ ebuild_main() { ;; esac - export PATH="/usr/local/sbin:/sbin:/usr/sbin:${ebuild_helpers_path}:/usr/local/bin:/bin:/usr/bin:${ROOTPATH}" + #export PATH="/usr/local/sbin:/sbin:/usr/sbin:${ebuild_helpers_path}:/usr/local/bin:/bin:/usr/bin:${ROOTPATH}" + # PREFIX: same deviation as at the top of this file + export PATH="${DEFAULT_PATH}:${ebuild_helpers_path}:${ROOTPATH}" [[ -n $PREROOTPATH ]] && export PATH="${PREROOTPATH%%:}:$PATH" unset ebuild_helpers_path -- 2.26.2