Make fixpackages use PORTAGE_NICENESS.
authorZac Medico <zmedico@gentoo.org>
Fri, 17 Nov 2006 14:59:21 +0000 (14:59 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 17 Nov 2006 14:59:21 +0000 (14:59 -0000)
svn path=/main/trunk/; revision=5073

bin/fixpackages

index f7c1bf51d4d3e665881dd05dc89fe10b3d191ec9..b7357f1664c9725c77fdb8ecd1ac94ad85c147dc 100755 (executable)
@@ -15,6 +15,14 @@ mysettings = portage.settings
 mytrees = portage.db
 mtimedb = portage.mtimedb
 
+try:
+       os.nice(int(mysettings.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
+
 portage.global_updates(mysettings, mytrees, mtimedb["updates"])
 
 print