summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-03-18 20:29:55 +0000
committerZac Medico <zmedico@gentoo.org>2006-03-18 20:29:55 +0000
commitb8a4f9798f2fca741f0eef3a029f1fa09bb5823c (patch)
treee61db15bcd164c80d5960528f9683f3f4a41110c /bin/misc-functions.sh
parentMinor speedup for findname2, suggested by Brian Harring (diff)
downloadportage-multirepo-b8a4f9798f2fca741f0eef3a029f1fa09bb5823c.tar.gz
portage-multirepo-b8a4f9798f2fca741f0eef3a029f1fa09bb5823c.tar.bz2
portage-multirepo-b8a4f9798f2fca741f0eef3a029f1fa09bb5823c.zip
Make PORTAGE_INST_UID and PORTAGE_INST_GID default to 0 in case of environment problems.
svn path=/main/trunk/; revision=2942
Diffstat (limited to 'bin/misc-functions.sh')
-rw-r--r--bin/misc-functions.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh
index dff88223..e5751e13 100644
--- a/bin/misc-functions.sh
+++ b/bin/misc-functions.sh
@@ -220,14 +220,14 @@ install_qa_check() {
find "${D}/" -user portage | while read file; do
count=$(( $count + 1 ))
if [ -L "${file}" ]; then
- lchown ${PORTAGE_INST_UID} "${file}"
+ lchown ${PORTAGE_INST_UID:-0} "${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 ${PORTAGE_INST_UID:-0} "$file"
chmod "$s" "$file"
fi
done
@@ -239,14 +239,14 @@ install_qa_check() {
find "${D}/" -group portage | while read file; do
count=$(( $count + 1 ))
if [ -L "${file}" ]; then
- lchgrp ${PORTAGE_INST_GID} "${file}"
+ lchgrp ${PORTAGE_INST_GID:-0} "${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 ${PORTAGE_INST_GID:-0} "$file"
chmod "$s" "$file"
fi
done