From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 84DEC159C9B for ; Fri, 9 Aug 2024 19:34:13 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7EEB0E2B8C; Fri, 9 Aug 2024 19:34:11 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 4150FE2B8B for ; Fri, 9 Aug 2024 19:34:11 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 270BD3430F6 for ; Fri, 9 Aug 2024 19:34:10 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 700231ED4 for ; Fri, 9 Aug 2024 19:34:07 +0000 (UTC) From: "Andreas K. Hüttel" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas K. Hüttel" Message-ID: <1722284865.655acfcf822fd83affaa32c2bc8a4a3188850d54.dilfridge@gentoo> Subject: [gentoo-commits] proj/catalyst:dilfridge/qcow2 commit in: catalyst/targets/ X-VCS-Repository: proj/catalyst X-VCS-Files: catalyst/targets/stage1.py X-VCS-Directories: catalyst/targets/ X-VCS-Committer: dilfridge X-VCS-Committer-Name: Andreas K. Hüttel X-VCS-Revision: 655acfcf822fd83affaa32c2bc8a4a3188850d54 X-VCS-Branch: dilfridge/qcow2 Date: Fri, 9 Aug 2024 19:34:07 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 20b0d8d9-0375-4ca7-a10b-16da9f8b7017 X-Archives-Hash: ffb2a3404d613d551b1b60f634ce5c2c Message-ID: <20240809193407.rqmke6z-AZh_J0Qwubfkj89ohOqBp1YSgEQsYxjErfA@z> commit: 655acfcf822fd83affaa32c2bc8a4a3188850d54 Author: Andreas K. Hüttel gentoo org> AuthorDate: Mon Jul 29 20:27:45 2024 +0000 Commit: Andreas K. Hüttel gentoo org> CommitDate: Mon Jul 29 20:27:45 2024 +0000 URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=655acfcf targets: Mount repos also under $ROOT for stage1 builds Signed-off-by: Andreas K. Hüttel gentoo.org> catalyst/targets/stage1.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/catalyst/targets/stage1.py b/catalyst/targets/stage1.py index 0ea5f92b..42931749 100644 --- a/catalyst/targets/stage1.py +++ b/catalyst/targets/stage1.py @@ -4,10 +4,11 @@ stage1 target # NOTE: That^^ docstring has influence catalyst-spec(5) man page generation. from catalyst import log -from catalyst.support import normpath +from catalyst.support import (normpath, get_repo_name) from catalyst.fileops import move_path from catalyst.base.stagebase import StageBase +from pathlib import Path class stage1(StageBase): """ @@ -22,6 +23,18 @@ class stage1(StageBase): def __init__(self, spec, addlargs): StageBase.__init__(self, spec, addlargs) + # 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 + for path, name, _ in self.repos: + name = get_repo_name(path) + mount_id = f'root_repo_{name}' + self.mount[mount_id] = { + 'enable': True, + 'source': path, + 'target': Path(normpath("/tmp/stage1root") + "/" + str(self.get_repo_location(name))) + } def set_root_path(self): # sets the root path, relative to 'chroot_path', of the stage1 root