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