packages, chroot: make sure chroots are initialised and /prebuilts is mounted

This commit is contained in:
InsanePrawn 2022-01-29 07:51:38 +01:00
parent 6bc3d36b11
commit 190251dd7d
2 changed files with 7 additions and 1 deletions

View file

@ -163,6 +163,8 @@ class Chroot:
self.base_packages = base_packages
if initialize:
self.initialize()
if self.name.startswith(BASE_CHROOT_PREFIX) and set(get_kupfer_local(self.arch).repos).intersection(set(self.extra_repos)):
raise Exception(f'Base chroot {self.name} had local repos specified: {self.extra_repos}')
# TODO: when we go multithreaded, activate() and initialize() probably need a reader-writer lock
@ -453,6 +455,7 @@ class Chroot:
native_mount = os.path.join(self.path, 'native')
logging.debug(f'Activating crossdirect in {native_mount}')
native_chroot.initialize()
native_chroot.mount_pacman_cache()
native_chroot.mount_packages()
native_chroot.activate()