diff options
author | Anna Vyalkova <cyber+gentoo@sysrq.in> | 2022-06-30 17:08:34 +0500 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-06-30 12:17:59 +0000 |
commit | 50e549dbc593ad3b7f936d503407caed1dc5b289 (patch) | |
tree | 284e8717127d4f355a5c5cd108137f95dd1c0a73 | |
parent | scripts/bootstrap-prefix.sh: use cp from GNU coreutils (diff) | |
download | prefix-50e549db.tar.gz prefix-50e549db.tar.bz2 prefix-50e549db.zip |
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@sysrq.in>
Closes: https://github.com/gentoo/prefix/pull/9
Signed-off-by: Sam James <sam@gentoo.org>
-rwxr-xr-x | scripts/bootstrap-prefix.sh | 15 |
1 files 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 |