Fix revdep-rebuild to properly honor PORTAGE_NICENESS as an incremental to the curren...
authorfuzzyray <fuzzyray@gentoo.org>
Thu, 17 Dec 2009 15:36:54 +0000 (15:36 -0000)
committerfuzzyray <fuzzyray@gentoo.org>
Thu, 17 Dec 2009 15:36:54 +0000 (15:36 -0000)
svn path=/trunk/gentoolkit/; revision=724

ChangeLog
bin/revdep-rebuild

index 7d421a3a807ca2dd4d1c66450cbafdfffb2c57f6..85f41f858b5453a7af7d9b30baf0930bb145e3aa 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-12-17: Paul Varner <fuzzyray@gentoo.org>
+       * revdep-rebuild: Fix revdep-rebuild to properly honor
+       PORTAGE_NICENESS as an incremental to the current nice level (Bug
+       297174).
+
 2009-12-08: Paul Varner <fuzzyray@gentoo.org>
        * gentoolkit: Merge rev 113 from djanderson's genscripts repo
 
index d32e4e112f74ded00fb4b55f98423e0031fd2845..9027a58dba5aa4a75c7c5266894fdbd146415226 100755 (executable)
@@ -1014,8 +1014,10 @@ portage_settings() {
 ##
 # Setup portage and the search paths
 setup_portage() {
-       # Obey PORTAGE_NICENESS
+       # Obey PORTAGE_NICENESS (which is incremental to the current nice value)
        if [[ $PORTAGE_NICENESS ]]; then
+               current_niceness=$(nice)
+               let PORTAGE_NICENESS=${current_niceness}+${PORTAGE_NICENESS}
                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.