aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas K. Hüttel <dilfridge@gentoo.org>2024-07-30 16:53:48 +0200
committerAndreas K. Hüttel <dilfridge@gentoo.org>2024-07-30 16:53:48 +0200
commitc836c804b8b7ef88273751411b7b1a7f5b021680 (patch)
tree057e70a7e4548dcdeed6a1e6a7083d26beb9f9bd /catalyst
parentstage1: we can't mount any squashfs twice, so we make sure we get a bind mount (diff)
downloadcatalyst-c836c804b8b7ef88273751411b7b1a7f5b021680.tar.gz
catalyst-c836c804b8b7ef88273751411b7b1a7f5b021680.tar.bz2
catalyst-c836c804b8b7ef88273751411b7b1a7f5b021680.zip
stage1: make sure we bind-mount within the chroot dir
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
Diffstat (limited to 'catalyst')
-rw-r--r--catalyst/targets/stage1.py8
1 files changed, 6 insertions, 2 deletions
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)
}