From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 8393A158003 for ; Thu, 30 Jun 2022 12:59:08 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8B4D8E082B; Thu, 30 Jun 2022 12:59:07 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 67409E082B for ; Thu, 30 Jun 2022 12:59:07 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 7562D34112B for ; Thu, 30 Jun 2022 12:59:06 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 0EFBE1E for ; Thu, 30 Jun 2022 12:59:05 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1656593492.cfa5808aa9015e7c95effa493c22d20b524c9901.sam@gentoo> Subject: [gentoo-commits] repo/proj/prefix:master commit in: scripts/ X-VCS-Repository: repo/proj/prefix X-VCS-Files: scripts/bootstrap-prefix.sh X-VCS-Directories: scripts/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: cfa5808aa9015e7c95effa493c22d20b524c9901 X-VCS-Branch: master Date: Thu, 30 Jun 2022 12:59:05 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 2ff3d267-0e43-455c-8652-c4890409fe11 X-Archives-Hash: 79a7f63f4370785313d6e7f45b293c62 commit: cfa5808aa9015e7c95effa493c22d20b524c9901 Author: Sam James gentoo org> AuthorDate: Thu Jun 30 12:51:32 2022 +0000 Commit: Sam James gentoo org> CommitDate: Thu Jun 30 12:51:32 2022 +0000 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=cfa5808a bootstrap-prefix.sh: fix fallback logic for bootstrap_coreutils Signed-off-by: Sam James gentoo.org> scripts/bootstrap-prefix.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh index 96d52d8390..039e6a5c61 100755 --- a/scripts/bootstrap-prefix.sh +++ b/scripts/bootstrap-prefix.sh @@ -1542,13 +1542,20 @@ bootstrap_stage1() { || [[ $(bison --version 2>&1) == *GNU" "Bison") "[3-9]* ]] \ || (bootstrap_bison) || return 1 if [[ -x ${ROOT}/tmp/usr/bin/uniq ]]; then + # If the system has a uniq, let's use it to test whether + # coreutils is new enough (and GNU). if [[ $(uniq --version 2>&1) == *"(GNU coreutils) "[6789]* ]]; then CP="cp" - else - CP="${ROOT}/tmp/bin/cp" - (bootstrap_coreutils) || return 1 fi fi + + # But for e.g. OpenBSD, it isn't going to be, so if our test failed, + # bootstrap coreutils. + if [[ -z ${CP} ]] ; then + CP="${ROOT}/tmp/bin/cp" + (bootstrap_coreutils) || return 1 + fi + [[ -x ${ROOT}/tmp/usr/bin/find ]] \ || [[ $(find --version 2>&1) == *GNU* ]] \ || (bootstrap_findutils) || return 1