summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Harring <ferringb@gentoo.org>2006-02-02 11:58:22 +0000
committerBrian Harring <ferringb@gentoo.org>2006-02-02 11:58:22 +0000
commiteff2a2d5cfc93b89a7ee5cc85a7258ca5562be8d (patch)
treeb614c268b4754ebeb0be48801d69a751a570acf4
parent86f314ec167ed3eac50425241f764b5146082dab (diff)
downloadportage-eff2a2d5cfc93b89a7ee5cc85a7258ca5562be8d.tar.gz
portage-eff2a2d5cfc93b89a7ee5cc85a7258ca5562be8d.tar.bz2
portage-eff2a2d5cfc93b89a7ee5cc85a7258ca5562be8d.zip
added PORTAGE_NICENESS support.
svn path=/main/trunk/; revision=2623
-rwxr-xr-xbin/emerge-webrsync9
1 files changed, 9 insertions, 0 deletions
diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync
index ffba88016..f68d0265b 100755
--- a/bin/emerge-webrsync
+++ b/bin/emerge-webrsync
@@ -5,6 +5,15 @@
# Author: Karl Trygve Kalleberg <karltk@gentoo.org>
# Rewritten from the old, Perl-based emerge-webrsync script
+if [ -z "$PULLED_NICENESS" ]; then
+ PULLED_NICENESS="$(/usr/lib/portage/bin/portageq envvar PORTAGE_NICENESS)"
+ if [ -n "$PULLED_NICENESS" ]; then
+ export PULLED_NICENESS
+ exec nice -n $PORTAGE_NICENESS "$0" "$@"
+ echo "failed pulling PORTAGE_NICENESS, disabling"
+ fi
+fi
+
GENTOO_MIRRORS="${GENTOO_MIRRORS} $(/usr/lib/portage/bin/portageq gentoo_mirrors)"
PORTDIR="$(/usr/lib/portage/bin/portageq portdir)"
FETCHCOMMAND="$(/usr/lib/portage/bin/portageq envvar FETCHCOMMAND)"