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 E6172159C9B for ; Fri, 9 Aug 2024 19:34:11 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C7309E2B82; Fri, 9 Aug 2024 19:34:10 +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 A8ED7E2B7E for ; Fri, 9 Aug 2024 19:34:10 +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 DE26F3430F3 for ; Fri, 9 Aug 2024 19:34:09 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 21C8C1ECE 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: <1717796723.31e62c9ca151083e0b84bab8f478bb27592c5086.dilfridge@gentoo> Subject: [gentoo-commits] proj/catalyst:dilfridge/qcow2 commit in: catalyst/base/ X-VCS-Repository: proj/catalyst X-VCS-Files: catalyst/base/stagebase.py X-VCS-Directories: catalyst/base/ X-VCS-Committer: dilfridge X-VCS-Committer-Name: Andreas K. Hüttel X-VCS-Revision: 31e62c9ca151083e0b84bab8f478bb27592c5086 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: aac60487-9577-44de-961f-ae0fdfb2b28e X-Archives-Hash: 273ccf3584cdd1c69fa6c6c983b670d4 commit: 31e62c9ca151083e0b84bab8f478bb27592c5086 Author: James Le Cuirot gentoo org> AuthorDate: Tue May 21 16:28:52 2024 +0000 Commit: Andreas K. Hüttel gentoo org> CommitDate: Fri Jun 7 21:45:23 2024 +0000 URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=31e62c9c Explicitly declare repo as main when it does not match the default main Otherwise Portage complains about PORTDIR not being set. Signed-off-by: James Le Cuirot gentoo.org> Closes: https://github.com/gentoo/catalyst/pull/13 Signed-off-by: Matt Turner gentoo.org> catalyst/base/stagebase.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py index 4bcab30c..1ebb2245 100644 --- a/catalyst/base/stagebase.py +++ b/catalyst/base/stagebase.py @@ -921,6 +921,12 @@ class StageBase(TargetBase, ClearBase, GenBase): continue config = configparser.ConfigParser() + + # If default is present but does not match this repo's location, + # then we need to explicitly set it as the main repo. + if default is not None: + config['DEFAULT'] = {'main-repo': name} + config[name] = {'location': location} self.write_repo_conf(name, config)