From 1d0f005091f5c9b713d8e3bd81b17a58f70a4060 Mon Sep 17 00:00:00 2001 From: themylogin Date: Mon, 16 Dec 2024 16:01:17 +0100 Subject: [PATCH] test --- scale_build/image/bootstrap.py | 7 ++++++- scale_build/image/update.py | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/scale_build/image/bootstrap.py b/scale_build/image/bootstrap.py index 92a9a1c3..ce3cfc2a 100644 --- a/scale_build/image/bootstrap.py +++ b/scale_build/image/bootstrap.py @@ -1,3 +1,4 @@ +import subprocess import logging import os import shutil @@ -16,7 +17,11 @@ def setup_chroot_basedir(bootstrapdir_obj): shutil.rmtree(CHROOT_BASEDIR) os.makedirs(TMPFS, exist_ok=True) run(['mount', '-t', 'tmpfs', '-o', 'size=16G', 'tmpfs', TMPFS]) - bootstrapdir_obj.restore_cache(CHROOT_BASEDIR) + #bootstrapdir_obj.restore_cache(CHROOT_BASEDIR) + subprocess.run(['unsquashfs', '-d', CHROOT_BASEDIR, '/1']) + os.makedirs(os.path.join(CHROOT_BASEDIR, 'proc')) + os.makedirs(os.path.join(CHROOT_BASEDIR, 'sys')) + os.makedirs(os.path.join(CHROOT_BASEDIR, 'packages')) run(['mount', 'proc', os.path.join(CHROOT_BASEDIR, 'proc'), '-t', 'proc']) run(['mount', 'sysfs', os.path.join(CHROOT_BASEDIR, 'sys'), '-t', 'sysfs']) os.makedirs(PACKAGE_PATH, exist_ok=True) diff --git a/scale_build/image/update.py b/scale_build/image/update.py index 2137e21f..d83bcc62 100644 --- a/scale_build/image/update.py +++ b/scale_build/image/update.py @@ -88,6 +88,7 @@ def install_rootfs_packages(): def install_rootfs_packages_impl(): + """ os.makedirs(os.path.join(CHROOT_BASEDIR, 'etc/dpkg/dpkg.cfg.d'), exist_ok=True) with open(os.path.join(CHROOT_BASEDIR, 'etc/dpkg/dpkg.cfg.d/force-unsafe-io'), 'w') as f: f.write('force-unsafe-io') @@ -115,8 +116,8 @@ def install_rootfs_packages_impl(): # Do any pruning of rootfs clean_rootfs() + """ - umount_chroot_basedir() build_extensions() with open(os.path.join(CHROOT_BASEDIR, 'etc/apt/sources.list'), 'w') as f: