From: Zac Medico Date: Fri, 17 Nov 2006 14:54:45 +0000 (-0000) Subject: For bug #155484, apply PORTAGE_NICENESS as soon as possible (especially before global... X-Git-Tag: v2.1.2~451 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=32bb8422116c90d1c9a67c25d8917472a03fdd69;p=portage.git For bug #155484, apply PORTAGE_NICENESS as soon as possible (especially before global updates). svn path=/main/trunk/; revision=5071 --- 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()