log: save imported config files too
Save the config files which are imported by the following syntax: from some_config import * Note: This requires kobo >= 0.6 Signed-off-by: Qixiang Wan <qwan@redhat.com>
This commit is contained in:
parent
c98f0a88d8
commit
2fa89c061b
@ -265,8 +265,10 @@ def run_compose(compose, create_latest_link=True, latest_link_status=None):
|
|||||||
|
|
||||||
# dump the config file
|
# dump the config file
|
||||||
date_str = datetime.datetime.strftime(datetime.datetime.now(), "%F_%X").replace(":", "-")
|
date_str = datetime.datetime.strftime(datetime.datetime.now(), "%F_%X").replace(":", "-")
|
||||||
config_dump = compose.paths.log.log_file("global", "config-copy_%s" % date_str)
|
for config_file in compose.conf.opened_files:
|
||||||
open(config_dump, "w").write(open(compose.conf._open_file, 'r').read())
|
config_dump = compose.paths.log.log_file("global", "config-copy_%s_%s"
|
||||||
|
% (os.path.basename(config_file), date_str))
|
||||||
|
open(config_dump, "w").write(open(config_file, 'r').read())
|
||||||
config_dump_full = compose.paths.log.log_file("global", "config-dump_%s" % date_str)
|
config_dump_full = compose.paths.log.log_file("global", "config-dump_%s" % date_str)
|
||||||
with open(config_dump_full, "w") as f:
|
with open(config_dump_full, "w") as f:
|
||||||
json.dump(compose.conf, f, sort_keys=True, indent=4)
|
json.dump(compose.conf, f, sort_keys=True, indent=4)
|
||||||
|
@ -25,7 +25,7 @@ Requires: yum => 3.4.3-28
|
|||||||
Requires: lorax >= 22.1
|
Requires: lorax >= 22.1
|
||||||
Requires: repoview
|
Requires: repoview
|
||||||
Requires: python-lockfile
|
Requires: python-lockfile
|
||||||
Requires: kobo
|
Requires: kobo >= 0.6
|
||||||
Requires: kobo-rpmlib
|
Requires: kobo-rpmlib
|
||||||
Requires: python-productmd
|
Requires: python-productmd
|
||||||
Requires: python-kickstart
|
Requires: python-kickstart
|
||||||
|
Loading…
Reference in New Issue
Block a user