Lines 26-31
from portage.util import (
Link Here
|
26 |
from portage.util.listdir import listdir |
26 |
from portage.util.listdir import listdir |
27 |
from portage.dbapi.vartree import vartree |
27 |
from portage.dbapi.vartree import vartree |
28 |
from portage.package.ebuild.config import config |
28 |
from portage.package.ebuild.config import config |
|
|
29 |
from portage.process import spawn |
29 |
|
30 |
|
30 |
|
31 |
|
31 |
def env_update( |
32 |
def env_update( |
Lines 444-446
def _env_update(makelinks, target_root, prev_mtimes, contents, env, writemsg_lev
Link Here
|
444 |
for x in env_keys: |
445 |
for x in env_keys: |
445 |
outfile.write("setenv %s '%s'\n" % (x, env[x])) |
446 |
outfile.write("setenv %s '%s'\n" % (x, env[x])) |
446 |
outfile.close() |
447 |
outfile.close() |
|
|
448 |
|
449 |
# execute +x scripts in /etc/env-update.d/ |
450 |
env_update_d_dir = os.path.join(eroot, "etc", "env-update.d") |
451 |
ensure_dirs(env_update_d_dir, mode=0o755) |
452 |
fns = listdir(env_update_d_dir, EmptyOnError=1) |
453 |
fns.sort() |
454 |
for x in fns: |
455 |
if len(x) < 3: |
456 |
continue |
457 |
if not x[0].isdigit() or not x[1].isdigit(): |
458 |
continue |
459 |
if x.startswith(".") or x.endswith("~") or x.endswith(".bak"): |
460 |
continue |
461 |
x = os.path.join(env_update_d_dir, x) |
462 |
if os.access(x, os.X_OK): |
463 |
spawn(x) |