Lines 21-26
Link Here
|
21 |
from portage.util.listdir import listdir |
21 |
from portage.util.listdir import listdir |
22 |
from portage.dbapi.vartree import vartree |
22 |
from portage.dbapi.vartree import vartree |
23 |
from portage.package.ebuild.config import config |
23 |
from portage.package.ebuild.config import config |
|
|
24 |
from portage.process import spawn |
24 |
|
25 |
|
25 |
|
26 |
|
26 |
def env_update(makelinks=1, target_root=None, prev_mtimes=None, contents=None, |
27 |
def env_update(makelinks=1, target_root=None, prev_mtimes=None, contents=None, |
Lines 389-391
Link Here
|
389 |
for x in env_keys: |
390 |
for x in env_keys: |
390 |
outfile.write("setenv %s '%s'\n" % (x, env[x])) |
391 |
outfile.write("setenv %s '%s'\n" % (x, env[x])) |
391 |
outfile.close() |
392 |
outfile.close() |
|
|
393 |
|
394 |
# execute +x scripts in /etc/env-update.d/ |
395 |
env_update_d_dir = os.path.join(eroot, "etc", "env-update.d") |
396 |
ensure_dirs(env_update_d_dir, mode=0o755) |
397 |
fns = listdir(env_update_d_dir, EmptyOnError=1) |
398 |
fns.sort() |
399 |
for x in fns: |
400 |
if len(x) < 3: |
401 |
continue |
402 |
if not x[0].isdigit() or not x[1].isdigit(): |
403 |
continue |
404 |
if x.startswith(".") or x.endswith("~") or x.endswith(".bak"): |
405 |
continue |
406 |
x = os.path.join(env_update_d_dir, x) |
407 |
if os.access(x, os.X_OK): |
408 |
spawn(x) |