commit:     cbe692f9c7a135157c22d5328026861a24f2d2ea
Author:     Paul Walker <paulwalker <AT> paulwalker <DOT> dev>
AuthorDate: Wed Dec  3 02:37:30 2025 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Wed Dec  3 07:59:36 2025 +0000
URL:        https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=cbe692f9

scripts/bootstrap-prefix: fix merged-usr errors

Fixes ${ROOT}/bin and ${ROOT}/lib not being symlinked to their
${ROOT}/usr counterparts during stage3 bootstrap.

Signed-off-by: Paul Walker <paulwalker <AT> paulwalker.dev>
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 scripts/bootstrap-prefix.sh | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh
index f89da4891c..be50d57271 100755
--- a/scripts/bootstrap-prefix.sh
+++ b/scripts/bootstrap-prefix.sh
@@ -618,7 +618,8 @@ bootstrap_startscript() {
 
 prepare_portage() {
        # see bootstrap_portage for explanations.
-       mkdir -p "${ROOT}"/bin/. "${ROOT}"/var/log
+       mkdir -p "${ROOT}"/usr/bin/. "${ROOT}"/var/log
+       ln -sf usr/bin "${ROOT}"/bin
        [[ -x ${ROOT}/bin/bash ]] || ln -s "${ROOT}"{/tmp,}/bin/bash || return 1
        [[ -x ${ROOT}/bin/sh ]] || ln -s bash "${ROOT}"/bin/sh || return 1
 }
@@ -2372,7 +2373,8 @@ bootstrap_stage3() {
        # script file need meson is beyond me.  So, we have no other way
        # than to fake it here for the time being like in stage2.
        if [[ ! -e "${ROOT}"/lib/gentoo/functions.sh ]] ; then
-               mkdir -p "${ROOT}"/lib/gentoo
+               mkdir -p "${ROOT}"/usr/lib/gentoo
+               ln -sf usr/lib "${ROOT}"/lib
                cp "${ROOT}"/tmp/lib/gentoo/functions.sh \
                        "${ROOT}"/lib/gentoo/functions.sh
        fi

Reply via email to