aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas K. Hüttel <dilfridge@gentoo.org>2024-08-03 11:06:29 +0200
committerAndreas K. Hüttel <dilfridge@gentoo.org>2024-08-03 11:06:29 +0200
commit31d975c10785f4de73cd788285ccf2408aa54a30 (patch)
tree23ee3ebb5977c6e3d04bddafcf56109ddd28e1bd /catalyst
parentAdd log.debug statements to follow profile symlink creation (diff)
downloadcatalyst-31d975c10785f4de73cd788285ccf2408aa54a30.tar.gz
catalyst-31d975c10785f4de73cd788285ccf2408aa54a30.tar.bz2
catalyst-31d975c10785f4de73cd788285ccf2408aa54a30.zip
stage1: make sure we bind-mount within the chroot dir, try 3, now with pathlib
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 ba42d9b8..ae27cd0a 100644
--- a/catalyst/targets/stage1.py
+++ b/catalyst/targets/stage1.py
@@ -31,14 +31,18 @@ class stage1(StageBase):
# 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
+ # In the meantime we fixed make.profile to point outside ROOT, so this may not
+ # be necessary at the moment anymore. Having it can prevent future surprises
+ # though.
self.set_chroot_path()
for path, name, _ in self.repos:
name = get_repo_name(path)
mount_id = f'root_repo_{name}'
+ repo_loc = self.get_repo_location(name)
self.mount[mount_id] = {
'enable': True,
- 'source': self.settings['chroot_path'] / self.get_repo_location(name),
- 'target': normpath("/tmp/stage1root") / self.get_repo_location(name)
+ 'source': self.settings['chroot_path'] / repo_loc.relative_to('/'),
+ 'target': normpath("/tmp/stage1root") / repo_loc.relative_to('/')
}
def set_root_path(self):