mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-03-24 20:16:32 +01:00
fix(stage0-image): sync steps trees in-place to preserve generated resume scripts
This commit is contained in:
parent
74ff570f76
commit
886d5a5237
1 changed files with 8 additions and 6 deletions
12
rootfs.py
12
rootfs.py
|
|
@ -107,9 +107,10 @@ with open(old_config_path, "r", encoding="utf-8") as cfg:
|
||||||
]
|
]
|
||||||
|
|
||||||
dest_steps = os.path.join(mountpoint, "steps")
|
dest_steps = os.path.join(mountpoint, "steps")
|
||||||
if os.path.exists(dest_steps):
|
if os.path.isdir(dest_steps):
|
||||||
shutil.rmtree(dest_steps)
|
shutil.copytree(steps_dir, dest_steps, dirs_exist_ok=True)
|
||||||
shutil.copytree(steps_dir, dest_steps)
|
else:
|
||||||
|
shutil.copytree(steps_dir, dest_steps)
|
||||||
|
|
||||||
config_path = os.path.join(dest_steps, "bootstrap.cfg")
|
config_path = os.path.join(dest_steps, "bootstrap.cfg")
|
||||||
if build_guix_also:
|
if build_guix_also:
|
||||||
|
|
@ -124,8 +125,9 @@ with open(config_path, "w", encoding="utf-8") as cfg:
|
||||||
|
|
||||||
if build_guix_also:
|
if build_guix_also:
|
||||||
dest_steps_guix = os.path.join(mountpoint, "steps-guix")
|
dest_steps_guix = os.path.join(mountpoint, "steps-guix")
|
||||||
if os.path.exists(dest_steps_guix):
|
if os.path.isdir(dest_steps_guix):
|
||||||
shutil.rmtree(dest_steps_guix)
|
shutil.copytree(steps_guix_dir, dest_steps_guix, dirs_exist_ok=True)
|
||||||
|
else:
|
||||||
shutil.copytree(steps_guix_dir, dest_steps_guix)
|
shutil.copytree(steps_guix_dir, dest_steps_guix)
|
||||||
|
|
||||||
if break_scope and break_step:
|
if break_scope and break_step:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue