summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfuzzyray <fuzzyray@gentoo.org>2009-12-17 15:36:54 +0000
committerfuzzyray <fuzzyray@gentoo.org>2009-12-17 15:36:54 +0000
commitb7263e2ae68e2883d772cf5c23451792af4a5ada (patch)
tree7f1f99518a6bc61f5935a54290fcc343c7579490
parent0c7beb06f1e7715e364721ab988d0a8a7ec4a09b (diff)
downloadgentoolkit-b7263e2ae68e2883d772cf5c23451792af4a5ada.tar.gz
Fix revdep-rebuild to properly honor PORTAGE_NICENESS as an incremental to the current nice level. (Bug 297174)
svn path=/trunk/gentoolkit/; revision=724
-rw-r--r--ChangeLog5
-rwxr-xr-xbin/revdep-rebuild4
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 7d421a3..85f41f8 100644
--- 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
diff --git a/bin/revdep-rebuild b/bin/revdep-rebuild
index d32e4e1..9027a58 100755
--- a/bin/revdep-rebuild
+++ b/bin/revdep-rebuild
@@ -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.