Lines 9-14
Link Here
|
9 |
import stat |
9 |
import stat |
10 |
import sys |
10 |
import sys |
11 |
import time |
11 |
import time |
|
|
12 |
import string |
12 |
|
13 |
|
13 |
import portage |
14 |
import portage |
14 |
from portage import os, _encodings, _unicode_decode, _unicode_encode |
15 |
from portage import os, _encodings, _unicode_decode, _unicode_encode |
Lines 334-341
Link Here
|
334 |
penvnotice = "# THIS FILE IS AUTOMATICALLY GENERATED BY env-update.\n" |
335 |
penvnotice = "# THIS FILE IS AUTOMATICALLY GENERATED BY env-update.\n" |
335 |
penvnotice += "# DO NOT EDIT THIS FILE. CHANGES TO STARTUP PROFILES\n" |
336 |
penvnotice += "# DO NOT EDIT THIS FILE. CHANGES TO STARTUP PROFILES\n" |
336 |
cenvnotice = penvnotice[:] |
337 |
cenvnotice = penvnotice[:] |
|
|
338 |
fenvnotice = penvnotice[:] |
337 |
penvnotice += "# GO INTO /etc/profile NOT /etc/profile.env\n\n" |
339 |
penvnotice += "# GO INTO /etc/profile NOT /etc/profile.env\n\n" |
338 |
cenvnotice += "# GO INTO /etc/csh.cshrc NOT /etc/csh.env\n\n" |
340 |
cenvnotice += "# GO INTO /etc/csh.cshrc NOT /etc/csh.env\n\n" |
|
|
341 |
fenvnotice += "# GO INTO /etc/profile NOT /etc/profile.fish\n\n" |
339 |
|
342 |
|
340 |
#create /etc/profile.env for bash support |
343 |
#create /etc/profile.env for bash support |
341 |
outfile = atomic_ofstream(os.path.join(eroot, "etc", "profile.env")) |
344 |
outfile = atomic_ofstream(os.path.join(eroot, "etc", "profile.env")) |
Lines 357-359
Link Here
|
357 |
for x in env_keys: |
360 |
for x in env_keys: |
358 |
outfile.write("setenv %s '%s'\n" % (x, env[x])) |
361 |
outfile.write("setenv %s '%s'\n" % (x, env[x])) |
359 |
outfile.close() |
362 |
outfile.close() |
|
|
363 |
|
364 |
#create /etc/profile.fish for fish support |
365 |
outfile = atomic_ofstream(os.path.join(eroot, "etc", "profile.fish")) |
366 |
outfile.write(fenvnotice) |
367 |
|
368 |
env_path = string.join(("'" + v + "'" for v in env["PATH"].split(":")), " ") |
369 |
env_keys = [x for x in env if x != "PATH"] |
370 |
env_keys.sort() |
371 |
for k in env_keys: |
372 |
outfile.write("set -gx %s '%s'\n" % (k, env[k])) |
373 |
outfile.write("set -gx PATH %s $PATH\n" % env_path) |
374 |
outfile.close() |