commit:     ed5c05f06cc314bf365cc9a13b769850e79c3643
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Sun Apr  3 18:08:56 2016 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Sun Apr  3 18:08:56 2016 +0000
URL:        https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=ed5c05f0

sys-apps/portage: use prefix bash if it exists

 sys-apps/portage/portage-2.2.28.ebuild | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/sys-apps/portage/portage-2.2.28.ebuild 
b/sys-apps/portage/portage-2.2.28.ebuild
index 2edcee5..dc0bdab 100644
--- a/sys-apps/portage/portage-2.2.28.ebuild
+++ b/sys-apps/portage/portage-2.2.28.ebuild
@@ -70,8 +70,6 @@ REQUIRED_USE="epydoc? ( $(python_gen_useflags 'python2*') )"
 
 SRC_ARCHIVES="https://dev.gentoo.org/~dolsen/releases/portage 
http://dev.gentoo.org/~grobian/distfiles";
 
-SRC_ARCHIVES="http://dev.gentoo.org/~zmedico/portage/archives 
http://dev.gentoo.org/~grobian/distfiles";
-
 prefix_src_archives() {
        local x y
        for x in ${@}; do
@@ -129,12 +127,18 @@ python_prepare_all() {
                        extrapath="/usr/sbin:/usr/bin:/sbin:/bin"
                fi
                local 
defaultpath="${EPREFIX}/usr/sbin:${EPREFIX}/usr/bin:${EPREFIX}/sbin:${EPREFIX}/bin"
+               # We need to probe for bash in the Prefix, because it may not
+               # exist, in which case we fall back to the currently in use
+               # bash.  This logic is necessary in particular during bootstrap,
+               # where we pull ourselves out of a temporary place with tools
+               local bash="${EPREFIX}/bin/bash"
+               [[ ! -x ${bash} ]] && bash=${BASH}
 
                einfo "Adjusting sources for ${EPREFIX}"
                find . -type f -exec \
                sed -e "s|@PORTAGE_EPREFIX@|${EPREFIX}|" \
                        -e "s|@PORTAGE_MV@|$(type -P mv)|" \
-                       -e "s|@PORTAGE_BASH@|${BASH}|" \
+                       -e "s|@PORTAGE_BASH@|${bash}|" \
                        -e "s|@PREFIX_PORTAGE_PYTHON@|$(type -P python)|" \
                        -e "s|@DEFAULT_PATH@|${defaultpath}|" \
                        -e "s|@EXTRA_PATH@|${extrapath}|" \

Reply via email to