Skip to content

Commit

Permalink
Fix .squashfs files not being cleaned up
Browse files Browse the repository at this point in the history
(cherry picked from commit 50c9da0)
  • Loading branch information
themylogin authored and bugclerk committed Jan 8, 2025
1 parent a5bb8dc commit 70813c6
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 @@ -232,10 +232,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 70813c6

Please sign in to comment.