Use rootuser/wheelgroup instead of the hardcoded PORTAGE_INST_{U,G}ID.
authorEmanuele Giaquinta <exg@gentoo.org>
Tue, 7 Mar 2006 14:26:26 +0000 (14:26 -0000)
committerEmanuele Giaquinta <exg@gentoo.org>
Tue, 7 Mar 2006 14:26:26 +0000 (14:26 -0000)
svn path=/main/branches/prefix/; revision=2823

bin/ebuild.sh

index 5fe63a6c102c06f5c2dca4a33d63e2824ea7a999..a3b252973d5e342dc70324b9165e625a200e50bb 100755 (executable)
@@ -1174,9 +1174,6 @@ dyn_test() {
 }
 
 
-PORTAGE_INST_UID="0"
-PORTAGE_INST_GID="0"
-
 dyn_install() {
        trap "abort_install" SIGINT SIGQUIT
        [ "$(type -t pre_src_install)" == "function" ] && pre_src_install
@@ -1355,14 +1352,14 @@ dyn_install() {
        find "${D}/" -user  @portageuser@ | while read file; do
                count=$(( $count + 1 ))
                if [ -L "${file}" ]; then
-                       lchown ${PORTAGE_INST_UID} "${file}"
+                       lchown @rootuser@ "${file}"
                else
                        s=$(stat_perms "$file")
                        if [ -z "${s}" ]; then
                                ewarn "failed stat_perm'ing $file.  User intervention during install isn't wise..."
                                continue
                        fi
-                       chown ${PORTAGE_INST_UID} "$file"
+                       chown @rootuser@ "$file"
                        chmod "$s" "$file"
                fi
        done
@@ -1374,14 +1371,14 @@ dyn_install() {
        find "${D}/" -group @portagegroup@ | while read file; do
                count=$(( $count + 1 ))
                if [ -L "${file}" ]; then
-                       lchgrp ${PORTAGE_INST_GID} "${file}"
+                       lchgrp @wheelgroup@ "${file}"
                else
                        s=$(stat_perms "$file")
                        if [ -z "${s}" ]; then
                                echo "failed stat_perm'ing '$file' . User intervention during install isn't wise..."
                                continue
                        fi
-                       chgrp ${PORTAGE_INST_GID} "$file"
+                       chgrp @wheelgroup@ "$file"
                        chmod "$s" "$file"
                fi
        done