From adc2eea22e27ba332d0afa73059309fff38d6edb Mon Sep 17 00:00:00 2001 From: fuzzyray Date: Thu, 17 Dec 2009 15:39:34 +0000 Subject: [PATCH] Fix revdep-rebuild to properly honor PORTAGE_NICENESS as an incremental to the current nice level. (Bug 297174) svn path=/branches/gentoolkit-0.2.4/; revision=725 --- ChangeLog | 5 +++++ src/revdep-rebuild/revdep-rebuild | 6 ++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6597880..0a1e272 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-12-17: Paul Varner + * 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 * revdep-rebuild: Add patch from loki_val to check -l dependencies in .la files (Bug #267898) diff --git a/src/revdep-rebuild/revdep-rebuild b/src/revdep-rebuild/revdep-rebuild index b44dadc..1dd10a9 100755 --- a/src/revdep-rebuild/revdep-rebuild +++ b/src/revdep-rebuild/revdep-rebuild @@ -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. -- 2.26.2