commit: 50e549dbc593ad3b7f936d503407caed1dc5b289 Author: Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in> AuthorDate: Thu Jun 30 12:08:34 2022 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Thu Jun 30 12:17:59 2022 +0000 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=50e549db
bootstrap-prefix.sh: fix build with system cp Because of commit 894e06af34951af850f7a86acf427a6b3f82a5eb, the script failed if bootstrap_coreutils step was not run. Signed-off-by: Anna Vyalkova <cyber+gentoo <AT> sysrq.in> Closes: https://github.com/gentoo/prefix/pull/9 Signed-off-by: Sam James <sam <AT> gentoo.org> scripts/bootstrap-prefix.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh index 9bcf8597f3..7421fa3f57 100755 --- a/scripts/bootstrap-prefix.sh +++ b/scripts/bootstrap-prefix.sh @@ -1516,6 +1516,8 @@ bootstrap_stage1() { # frequently pollute the environment using exports which affect # packages following (e.g. zlib builds 64-bits) + local CP + # don't rely on $MAKE, if make == gmake packages that call 'make' fail [[ -x ${ROOT}/tmp/usr/bin/make ]] \ || [[ $(make --version 2>&1) == *GNU" Make "4* ]] \ @@ -1539,9 +1541,14 @@ bootstrap_stage1() { || [[ $(bison --version 2>&1) == *GNU" "Bison") "2.[3-7]* ]] \ || [[ $(bison --version 2>&1) == *GNU" "Bison") "[3-9]* ]] \ || (bootstrap_bison) || return 1 - [[ -x ${ROOT}/tmp/usr/bin/uniq ]] \ - || [[ $(uniq --version 2>&1) == *"(GNU coreutils) "[6789]* ]] \ - || (bootstrap_coreutils) || return 1 + if [[ -x ${ROOT}/tmp/usr/bin/uniq ]] + if [[ $(uniq --version 2>&1) == *"(GNU coreutils) "[6789]* ]]; then + CP="cp" + else + CP="${ROOT}/tmp/bin/cp" + (bootstrap_coreutils) || return 1 + fi + fi [[ -x ${ROOT}/tmp/usr/bin/find ]] \ || [[ $(find --version 2>&1) == *GNU* ]] \ || (bootstrap_findutils) || return 1 @@ -1647,7 +1654,7 @@ bootstrap_stage1() { -e ${MAKE_CONF_DIR}/0100_bootstrap_prefix_make.conf ]] \ || (bootstrap_setup) || return 1 mkdir -p "${ROOT}"/tmp/etc/. || return 1 - [[ -e ${ROOT}/tmp/etc/portage/make.profile ]] || "${ROOT}"/tmp/bin/cp -dpR "${ROOT}"/etc/portage "${ROOT}"/tmp/etc || return 1 + [[ -e ${ROOT}/tmp/etc/portage/make.profile ]] || "${CP}" -dpR "${ROOT}"/etc/portage "${ROOT}"/tmp/etc || return 1 # setup portage [[ -e ${ROOT}/tmp/usr/bin/emerge ]] || (bootstrap_portage) || return 1
