commit:     1cb05eb6b30719c84916f57c789ca9cef1f131f6
Author:     Arsen Arsenović <arsen <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 27 18:16:20 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jul 28 08:02:39 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=1cb05eb6

scripts/bootstrap-prefix: remove error-prone shell logic

This script, in particular, causes the second emerge branch to be taken
if the first branch is intended and failed, obscuring errors.

Signed-off-by: Arsen Arsenović <arsen <AT> gentoo.org>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 scripts/bootstrap-prefix.sh | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh
index a4247c3241..d1387391d9 100755
--- a/scripts/bootstrap-prefix.sh
+++ b/scripts/bootstrap-prefix.sh
@@ -1972,9 +1972,11 @@ bootstrap_stage3() {
 
        # pre_emerge_pkgs relies on stage 2 portage.
        pre_emerge_pkgs() {
-               is-rap \
-                       && without_stack_emerge_pkgs "$@" \
-                       || with_stack_emerge_pkgs "$@"
+               if is-rap; then
+                       without_stack_emerge_pkgs "$@"
+               else
+                       with_stack_emerge_pkgs "$@"
+               fi
        }
 
        # Some packages fail to properly depend on sys-apps/texinfo.

Reply via email to