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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id CE0D31382C5 for ; Mon, 18 Jan 2021 20:22:11 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0BE44E083B; Mon, 18 Jan 2021 20:22:11 +0000 (UTC) Received: from mail-qk1-f181.google.com (mail-qk1-f181.google.com [209.85.222.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 05388E083B for ; Mon, 18 Jan 2021 20:22:11 +0000 (UTC) Received: by mail-qk1-f181.google.com with SMTP id b64so19852942qkc.12 for ; Mon, 18 Jan 2021 12:22:10 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=k07X4nmaNClEilL70ZEjxSBjxipR2jSDwv5YF1iQTjA=; b=rT8Hl/tCkVrIe6yvBSknwDVKKm88439q8pt7bqIkQmB9oBjHEyhmMKf1zA1AWTRRw5 TcrP92eCpiUjrjdLHYhqVBAXt3jb9RQZWZPoVRN5rgFodRFQu6k3IqGTDosU4on800L+ b0HuGpMVSj2R1kKPl3GaHkEyQGXySbt21CsVqLUyR7g2Q1ubVQXTgtxQdj3y+zEwnie1 F+iN1oaW+SkNBuWojkGkyRAb+PzmZ76nSaIySlgjiMME0Smc0cg/I6ujs2sAerSK6zCb LiVF0+7UwHGz+pTEl/nY4E0A7FxQIIm5Odw11T+yt8fA4se4QtvAdAFhQVtAtFKaa8yJ GjEQ== X-Gm-Message-State: AOAM532ix0mzj12YjPP58IF44MdQj+kVt/8tWD63g9lXHCcFrS1cjfNE xOPCkLA+Iy2q9ZFYR/Xdo/LTNiFb2V8= X-Google-Smtp-Source: ABdhPJxSdH101HxnPy8pr1nWXXGCE2IAx1SMj5Xrp7+NDSfDCWUFJCZbVXK9FFX0inIBmMT9Lgf68g== X-Received: by 2002:a05:620a:2017:: with SMTP id c23mr1361246qka.114.1611001330040; Mon, 18 Jan 2021 12:22:10 -0800 (PST) Received: from localhost ([208.104.103.123]) by smtp.gmail.com with ESMTPSA id p8sm962849qkj.10.2021.01.18.12.22.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jan 2021 12:22:09 -0800 (PST) From: Matt Turner To: gentoo-catalyst@lists.gentoo.org Cc: Matt Turner Subject: [gentoo-catalyst] [PATCH 07/11] catalyst: Call config_profile_link for all targets Date: Mon, 18 Jan 2021 15:21:48 -0500 Message-Id: <20210118202152.374078-7-mattst88@gentoo.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210118202152.374078-1-mattst88@gentoo.org> References: <20210118202152.374078-1-mattst88@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-catalyst@lists.gentoo.org Reply-to: gentoo-catalyst@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Archives-Salt: 0b02a7c1-0159-44a7-a7e1-7a71ca9a1fa8 X-Archives-Hash: 8f634d251542e6ee557b913936812837 This reverts the following two commits, which have no documented rationale. Revert "Set the profile by calling eselect." This reverts commit 90c03f9dc255ba89849e46490f9ead7ab3921950. Revert "Drop config_profile_link from the action_sequence for the generic stage." This reverts commit 3bd10159bf7cfe14b6d8a8218b94eca73be4c997. Doing so improves the code in two ways: 1) it makes prepare_sequence identical across all targets, which will allow deduplicating some code 2) it no longer calls eselect profile each time chroot-functions.sh is sourced (even for those targets that were still calling config_profile_link) Signed-off-by: Matt Turner --- catalyst/base/stagebase.py | 3 ++- targets/support/chroot-functions.sh | 3 --- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py index 447e073d..53b0a224 100644 --- a/catalyst/base/stagebase.py +++ b/catalyst/base/stagebase.py @@ -500,6 +500,7 @@ class StageBase(TargetBase, ClearBase, GenBase): """Set basic stage1, 2, 3 action sequences""" self.prepare_sequence.extend([ self.unpack, + self.config_profile_link, self.setup_confdir, self.portage_overlay, ]) @@ -771,7 +772,7 @@ class StageBase(TargetBase, ClearBase, GenBase): log.info('Configuring profile link...') make_profile = Path(self.settings['chroot_path'] + self.settings['port_conf'], 'make.profile') - make_profile.unlink() + make_profile.unlink(missing_ok=True) make_profile.symlink_to(Path('../..' + self.settings['repo_basedir'], self.settings['repo_name'], 'profiles', diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh index 2aec018e..88465c31 100755 --- a/targets/support/chroot-functions.sh +++ b/targets/support/chroot-functions.sh @@ -1,8 +1,5 @@ #!/bin/bash -# Set the profile -eselect profile set ${clst_target_profile} - # Trap these signals and kill ourselves if received # Force ourselves to die if any of these signals are received # most likely our controlling terminal is gone -- 2.26.2