Skip to content

Commit

Permalink
Fix .squashfs files not being cleaned up
Browse files Browse the repository at this point in the history
  • Loading branch information
themylogin committed Jan 8, 2025
1 parent a506fba commit 50c9da0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scale_build/image/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,10 +245,10 @@ def build_extensions():

run(["mksquashfs", td, f"{sysext_extensions_dir}/functioning-dpkg.raw"])

with tempfile.NamedTemporaryFile(suffix=".squashfs") as tf:
tf.close()
run(["mksquashfs", CHROOT_BASEDIR, tf.name, "-one-file-system"])
do_build_extensions(tf.name, sysext_extensions_dir)
with tempfile.TemporaryDirectory() as td:
rootfs_image = f"{td}/rootfs.squashfs"
run(["mksquashfs", CHROOT_BASEDIR, rootfs_image, "-one-file-system"])
do_build_extensions(rootfs_image, sysext_extensions_dir)

external_extesions_dir = os.path.join(RELEASE_DIR, "extensions")
os.makedirs(external_extesions_dir, exist_ok=True)
Expand Down

0 comments on commit 50c9da0

Please sign in to comment.