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 A455115817D for ; Fri, 7 Jun 2024 21:45:39 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C37D0E29D5; Fri, 7 Jun 2024 21:45:38 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A1FC2E29D5 for ; Fri, 7 Jun 2024 21:45:38 +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) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A2EDE33C1EB for ; Fri, 7 Jun 2024 21:45:37 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 841761C56 for ; Fri, 7 Jun 2024 21:45:35 +0000 (UTC) From: "Matt Turner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Matt Turner" Message-ID: <1717796723.31e62c9ca151083e0b84bab8f478bb27592c5086.mattst88@gentoo> Subject: [gentoo-commits] proj/catalyst:master commit in: catalyst/base/ X-VCS-Repository: proj/catalyst X-VCS-Files: catalyst/base/stagebase.py X-VCS-Directories: catalyst/base/ X-VCS-Committer: mattst88 X-VCS-Committer-Name: Matt Turner X-VCS-Revision: 31e62c9ca151083e0b84bab8f478bb27592c5086 X-VCS-Branch: master Date: Fri, 7 Jun 2024 21:45:35 +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: 5d490840-9d6e-457b-b9c0-d0e3a7ea12ea X-Archives-Hash: aebc83ac6100dbd3adda1e41fcb60ad8 commit: 31e62c9ca151083e0b84bab8f478bb27592c5086 Author: James Le Cuirot gentoo org> AuthorDate: Tue May 21 16:28:52 2024 +0000 Commit: Matt Turner 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)