From 32bb8422116c90d1c9a67c25d8917472a03fdd69 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 17 Nov 2006 14:54:45 +0000 Subject: [PATCH] For bug #155484, apply PORTAGE_NICENESS as soon as possible (especially before global updates). svn path=/main/trunk/; revision=5071 --- bin/emerge | 17 +++++++++-------- 1 file 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() -- 2.26.2