Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
themylogin committed Dec 16, 2024
1 parent feebace commit 1d0f005
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 6 additions & 1 deletion scale_build/image/bootstrap.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import subprocess
import logging
import os
import shutil
Expand All @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion scale_build/image/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 1d0f005

Please sign in to comment.