commit:     55888020536b3866ff29f27d6b4e6ede77ae791f
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 14 13:09:51 2024 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Sun Jul 14 13:09:51 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=55888020

scripts/bootstrap-prefix: define PORTAGE_INST_{UID,GID}

Based on the patch by Etienne Buira <etienne.buira <AT> free.fr> in bug #933100.

Mainline Portage doesn't set the Portage UID/GID, so define them in
make.conf during bootstrap for RAP targets.

Closes: https://bugs.gentoo.org/933100
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 scripts/bootstrap-prefix.sh | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh
index 721157f1df..024a77392a 100755
--- a/scripts/bootstrap-prefix.sh
+++ b/scripts/bootstrap-prefix.sh
@@ -306,6 +306,15 @@ bootstrap_setup() {
                                echo
                                echo 'ACCEPT_KEYWORDS="~ppc-macos"'
                        fi
+
+                       if is-rap ; then
+                               # https://bugs.gentoo.org/933100
+                               # mainline Portage doesn't set these like 
Prefix branch
+                               # does, so hardwire the IDs here
+                               echo
+                               echo "PORTAGE_INST_UID=$(id --user)"
+                               echo "PORTAGE_INST_GID=$(id --group)"
+                       fi
                } > "${MAKE_CONF_DIR}/0100_bootstrap_prefix_make.conf"
        fi
 

Reply via email to