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

ChangeLog
src/revdep-rebuild/revdep-rebuild

index 65978801a9a3f9d181c806a523c15c990583da25..0a1e272b9f54bb431dd78d7bd2092465f0aff115 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-04-30: Paul Varner <fuzzyray@gentoo.org>
        * revdep-rebuild: Add patch from loki_val to check -l dependencies in 
        .la files (Bug #267898)
index b44dadc2a06ffb9a01d39d05dc86db2e2745d115..1dd10a950bf4046438f242ff2dc35e3c6384c3df 100755 (executable)
@@ -967,11 +967,13 @@ show_unowned_files() {
 ##
 # Setup portage and the search paths
 setup_portage() {
-       local PORTAGE_NICENESS=$(portageq envvar PORTAGE_NICENESS)
+       PORTAGE_NICENESS=$(portageq envvar PORTAGE_NICENESS)
        PORTAGE_ROOT=$(portageq envvar ROOT)
 
-       # 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.