Fix for PORTAGE_NICENESS
authorfuzzyray <fuzzyray@gentoo.org>
Tue, 7 Feb 2006 04:36:33 +0000 (04:36 -0000)
committerfuzzyray <fuzzyray@gentoo.org>
Tue, 7 Feb 2006 04:36:33 +0000 (04:36 -0000)
svn path=/; revision=276

trunk/ChangeLog
trunk/src/revdep-rebuild/revdep-rebuild

index fd8884a8f3e96faa321a06f3e55f767a3af30211..b200f118abafc63cfeb5b3dc1b225999560a650e 100644 (file)
@@ -1,3 +1,7 @@
+2006-02-06 Paul Varner <fuzzyray@gentoo.org>
+       * revdep-rebuild: Reset PORTAGE_NICENESS, so that emerge is not niced
+       twice. Thanks to Lukas Reck for the patch. (Bug 121482)
+
 2006-01-24 Marius Mauch <genone@gentoo.org>
        * glsa-check: Use vbd information in verbose list mode (patch by solar)
 
index d6bd69ab9461b2e86d4e08005da76f7fbb19d3fc..2f35e3db53ba3f1bea5b15ce6e27f2a68b995f3d 100755 (executable)
@@ -56,7 +56,13 @@ echo "Configuring search environment for revdep-rebuild"
 
 # Obey PORTAGE_NICENESS
 PORTAGE_NICENESS=$(portageq envvar PORTAGE_NICENESS)
-[ ! -z "$PORTAGE_NICENESS" ] && renice $PORTAGE_NICENESS $$ > /dev/null
+if [ ! -z "$PORTAGE_NICENESS" ]
+then
+       renice $PORTAGE_NICENESS $$ > /dev/null
+       # Since we have already set our nice value for our processes,
+       # reset PORTAGE_NICENESS to zero to avoid having emerge renice again.
+       export PORTAGE_NICENESS="0"
+fi
 
 PORTAGE_ROOT=$(portageq envvar ROOT)
 [ -z "$PORTAGE_ROOT" ] && PORTAGE_ROOT="/"