summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-03-02 19:10:47 +0000
committerZac Medico <zmedico@gentoo.org>2006-03-02 19:10:47 +0000
commit2bd5176748377937d7c2fc8c3bd39243463434b2 (patch)
treef388fa5bd74f62e045cb561dd92ab33d8be6eaec /bin/emerge-webrsync
parentFix typo in emerge-webrsync PORTAGE_NICENESS handling for bug #124621 (regres... (diff)
downloadportage-multirepo-2bd5176748377937d7c2fc8c3bd39243463434b2.tar.gz
portage-multirepo-2bd5176748377937d7c2fc8c3bd39243463434b2.tar.bz2
portage-multirepo-2bd5176748377937d7c2fc8c3bd39243463434b2.zip
Make emerge-webrsync use renice for cleaner PORTAGE_NICENESS handling (bug #124621).
svn path=/main/trunk/; revision=2806
Diffstat (limited to 'bin/emerge-webrsync')
-rwxr-xr-xbin/emerge-webrsync12
1 files changed, 5 insertions, 7 deletions
diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync
index 5f8aa67f..ec4e5923 100755
--- a/bin/emerge-webrsync
+++ b/bin/emerge-webrsync
@@ -5,13 +5,11 @@
# Author: Karl Trygve Kalleberg <karltk@gentoo.org>
# Rewritten from the old, Perl-based emerge-webrsync script
-if [ -z "$PORTAGE_NICENESS" ]; then
- PORTAGE_NICENESS="$(/usr/lib/portage/bin/portageq envvar PORTAGE_NICENESS)"
- if [ -n "$PORTAGE_NICENESS" ]; then
- export PORTAGE_NICENESS
- exec nice -n $PORTAGE_NICENESS "$0" "$@"
- echo "failed pulling PORTAGE_NICENESS, disabling"
- fi
+# If PORTAGE_NICENESS is overriden via the env then it will
+# still pass through the portageq call and override properly.
+PORTAGE_NICENESS="$(/usr/lib/portage/bin/portageq envvar PORTAGE_NICENESS)"
+if [ -n "${PORTAGE_NICENESS}" ]; then
+ renice $PORTAGE_NICENESS $$ > /dev/null
fi
GENTOO_MIRRORS="${GENTOO_MIRRORS} $(/usr/lib/portage/bin/portageq gentoo_mirrors)"