Lines 12846-12851
Link Here
|
12846 |
settings["NOCOLOR"] = "true" |
12846 |
settings["NOCOLOR"] = "true" |
12847 |
settings.backup_changes("NOCOLOR") |
12847 |
settings.backup_changes("NOCOLOR") |
12848 |
|
12848 |
|
|
|
12849 |
def ionice(settings): |
12850 |
|
12851 |
ionice_cmd = settings.get("PORTAGE_IONICE_COMMAND") |
12852 |
if ionice_cmd: |
12853 |
ionice_cmd = shlex.split(ionice_cmd) |
12854 |
if not ionice_cmd: |
12855 |
return |
12856 |
|
12857 |
from portage.util import varexpand |
12858 |
variables = {"PID" : str(os.getpid())} |
12859 |
cmd = [varexpand(x, mydict=variables) for x in ionice_cmd] |
12860 |
|
12861 |
try: |
12862 |
rval = portage.process.spawn(cmd, env=os.environ) |
12863 |
except portage.exception.CommandNotFound: |
12864 |
# The OS kernel probably doesn't support ionice, |
12865 |
# so return silently. |
12866 |
return |
12867 |
|
12868 |
if rval != os.EX_OK: |
12869 |
out = portage.output.EOutput() |
12870 |
out.eerror("PORTAGE_IONICE_COMMAND returned %d" % (rval,)) |
12871 |
|
12849 |
def emerge_main(): |
12872 |
def emerge_main(): |
12850 |
global portage # NFC why this is necessary now - genone |
12873 |
global portage # NFC why this is necessary now - genone |
12851 |
portage._disable_legacy_globals() |
12874 |
portage._disable_legacy_globals() |
Lines 12867-12872
Link Here
|
12867 |
settings, trees, mtimedb = load_emerge_config() |
12890 |
settings, trees, mtimedb = load_emerge_config() |
12868 |
portdb = trees[settings["ROOT"]]["porttree"].dbapi |
12891 |
portdb = trees[settings["ROOT"]]["porttree"].dbapi |
12869 |
|
12892 |
|
|
|
12893 |
ionice(settings) |
12894 |
|
12870 |
try: |
12895 |
try: |
12871 |
os.nice(int(settings.get("PORTAGE_NICENESS", "0"))) |
12896 |
os.nice(int(settings.get("PORTAGE_NICENESS", "0"))) |
12872 |
except (OSError, ValueError), e: |
12897 |
except (OSError, ValueError), e: |