From c836c804b8b7ef88273751411b7b1a7f5b021680 Mon Sep 17 00:00:00 2001 From: "Andreas K. Hüttel" Date: Tue, 30 Jul 2024 16:53:48 +0200 Subject: stage1: make sure we bind-mount within the chroot dir MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Andreas K. Hüttel --- catalyst/targets/stage1.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'catalyst') diff --git a/catalyst/targets/stage1.py b/catalyst/targets/stage1.py index 1c9a4d42..cd10c86a 100644 --- a/catalyst/targets/stage1.py +++ b/catalyst/targets/stage1.py @@ -26,13 +26,17 @@ class stage1(StageBase): # In the stage1 build we need to make sure that the ebuild repositories are # accessible within $ROOT too... otherwise relative symlinks may point nowhere # and, e.g., portageq may malfunction due to missing profile. - # Create a second bind mount entry for each repository + # Create a second, bind mount entry for each repository. We need to + # * take as source not the original source but the original target, since + # otherwise we may end up trying to mount the same squashfs twice instead + # of a bind mount + # * take the directory inside the chroot as source, not the host directory for path, name, _ in self.repos: name = get_repo_name(path) mount_id = f'root_repo_{name}' self.mount[mount_id] = { 'enable': True, - 'source': self.get_repo_location(name), + 'source': self.settings['chroot_path'] / self.get_repo_location(name), 'target': normpath("/tmp/stage1root") / self.get_repo_location(name) } -- cgit v1.2.3-65-gdbad