summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-11-17 14:54:45 +0000
committerZac Medico <zmedico@gentoo.org>2006-11-17 14:54:45 +0000
commit32bb8422116c90d1c9a67c25d8917472a03fdd69 (patch)
treee8d93e3c5bb16e7c1d88d5f48ea99edad9e9f699
parent9dc402a12aaddd2f6f9e2c6f17acc0f2cdd6bbdd (diff)
downloadportage-32bb8422116c90d1c9a67c25d8917472a03fdd69.tar.gz
portage-32bb8422116c90d1c9a67c25d8917472a03fdd69.tar.bz2
portage-32bb8422116c90d1c9a67c25d8917472a03fdd69.zip
For bug #155484, apply PORTAGE_NICENESS as soon as possible (especially before global updates).
svn path=/main/trunk/; revision=5071
-rwxr-xr-xbin/emerge17
1 files changed, 9 insertions, 8 deletions
diff --git a/bin/emerge b/bin/emerge
index f2b87f1e3..495215393 100755
--- a/bin/emerge
+++ b/bin/emerge
@@ -4391,6 +4391,15 @@ def emerge_main():
os.umask(022)
settings, trees, mtimedb = load_emerge_config()
portdb = trees[settings["ROOT"]]["porttree"].dbapi
+
+ try:
+ os.nice(int(settings.get("PORTAGE_NICENESS", "0")))
+ except (OSError, ValueError), e:
+ portage.writemsg("!!! Failed to change nice value to '%s'\n" % \
+ settings["PORTAGE_NICENESS"])
+ portage.writemsg("!!! %s\n" % str(e))
+ del e
+
if portage.global_updates(settings, trees, mtimedb["updates"]):
mtimedb.commit()
# Reload the whole config from scratch.
@@ -4432,14 +4441,6 @@ def emerge_main():
portage.deprecated_profile_check()
- try:
- os.nice(int(settings.get("PORTAGE_NICENESS", "0")))
- except (OSError, ValueError), e:
- portage.writemsg("!!! Failed to change nice value to '%s'\n" % \
- settings["PORTAGE_NICENESS"])
- portage.writemsg("!!! %s\n" % str(e))
- del e
-
#Freeze the portdbapi for enhanced performance:
for myroot in trees:
trees[myroot]["porttree"].dbapi.freeze()