Lines 16-26
import subprocess
Link Here
|
16 |
import sys |
16 |
import sys |
17 |
import tempfile |
17 |
import tempfile |
18 |
|
18 |
|
|
|
19 |
from collections import OrderedDict |
20 |
|
19 |
import portage |
21 |
import portage |
20 |
from portage import _encodings, os, shutil |
22 |
from portage import _encodings, os, shutil |
21 |
from portage.env.loaders import KeyValuePairFileLoader |
23 |
from portage.env.loaders import KeyValuePairFileLoader |
22 |
from portage.localization import _ |
24 |
from portage.localization import _ |
23 |
from portage.util import shlex_split, varexpand |
25 |
from portage.util import shlex_split, varexpand, _recursive_file_list |
24 |
from portage.util.path import iter_parents |
26 |
from portage.util.path import iter_parents |
25 |
|
27 |
|
26 |
RCS_BRANCH = '1.1.1' |
28 |
RCS_BRANCH = '1.1.1' |
Lines 386-388
def file_archive_post_process(archive):
Link Here
|
386 |
if os.path.isdir(dest) and not os.path.islink(dest): |
388 |
if os.path.isdir(dest) and not os.path.islink(dest): |
387 |
_file_archive_rotate(dest) |
389 |
_file_archive_rotate(dest) |
388 |
os.rename(archive + '.dist.new', dest) |
390 |
os.rename(archive + '.dist.new', dest) |
389 |
- |
391 |
|
|
|
392 |
def perform_conf_update_hooks(kind, conf): |
393 |
conf_update_dir = os.path.join(portage.settings["PORTAGE_CONFIGROOT"], |
394 |
portage.USER_CONFIG_PATH, "conf-update.d") |
395 |
hooks = OrderedDict() |
396 |
for filepath in _recursive_file_list(conf_update_dir): |
397 |
name = filepath.split(conf_update_dir)[1].lstrip(os.sep) |
398 |
if os.access(filepath, os.X_OK): |
399 |
hooks[filepath] = name |
400 |
else: |
401 |
writemsg_level(" %s %s hook: '%s' is not executable\n" |
402 |
% (warn("*"), _dir, _unicode_decode(name),), |
403 |
level=logging.WARN, noiselevel=2) |
404 |
|
405 |
for filepath in hooks: |
406 |
retval = portage.process.spawn([filepath, kind, conf]) |
407 |
|
408 |
if retval != os.EX_OK: |
409 |
writemsg_level(" %s Spawn failed for: %s, %s\n" % (bad("*"), |
410 |
_unicode_decode(_hooks[filepath]), filepath), |
411 |
level=logging.ERROR, noiselevel=-1) |