Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/prefix:master commit in: scripts/
Date: Thu, 30 Jun 2022 16:11:33
Message-Id: 1656605455.38401400615050684b8902f831abccee0bd551ed.sam@gentoo
1 commit: 38401400615050684b8902f831abccee0bd551ed
2 Author: Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in>
3 AuthorDate: Thu Jun 30 13:08:08 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Thu Jun 30 16:10:55 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=38401400
7
8 bootstrap-prefix.sh: fix coreutils check
9
10 It should be inverted. Also bootstrap coreutils only when needed.
11
12 Signed-off-by: Anna Vyalkova <cyber+gentoo <AT> sysrq.in>
13 Closes: https://github.com/gentoo/prefix/pull/11
14 Signed-off-by: Sam James <sam <AT> gentoo.org>
15
16 scripts/bootstrap-prefix.sh | 13 ++++++-------
17 1 file changed, 6 insertions(+), 7 deletions(-)
18
19 diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh
20 index fbf7af3b68..5670f37bc2 100755
21 --- a/scripts/bootstrap-prefix.sh
22 +++ b/scripts/bootstrap-prefix.sh
23 @@ -1542,20 +1542,19 @@ bootstrap_stage1() {
24 || [[ $(bison --version 2>&1) == *GNU" "Bison") "2.[3-7]* ]] \
25 || [[ $(bison --version 2>&1) == *GNU" "Bison") "[3-9]* ]] \
26 || (bootstrap_bison) || return 1
27 - if [[ -x ${ROOT}/tmp/usr/bin/uniq ]]; then
28 + if [[ ! -x ${ROOT}/tmp/usr/bin/uniq ]]; then
29 # If the system has a uniq, let's use it to test whether
30 # coreutils is new enough (and GNU).
31 if [[ $(uniq --version 2>&1) == *"(GNU coreutils) "[6789]* ]]; then
32 CP="cp"
33 + else
34 + (bootstrap_coreutils) || return 1
35 fi
36 fi
37
38 - # But for e.g. OpenBSD, it isn't going to be, so if our test failed,
39 - # bootstrap coreutils.
40 - if [[ -z ${CP} ]] ; then
41 - CP="${ROOT}/tmp/bin/cp"
42 - (bootstrap_coreutils) || return 1
43 - fi
44 + # But for e.g. BSD, it isn't going to be, so if our test failed,
45 + # use bootstrapped coreutils.
46 + [[ -z ${CP} ]] && CP="${ROOT}/tmp/bin/cp"
47
48 [[ -x ${ROOT}/tmp/usr/bin/find ]] \
49 || [[ $(find --version 2>&1) == *GNU* ]] \