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 69A7313835B for ; Fri, 29 Jan 2021 23:50:54 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 14413E0AB8; Fri, 29 Jan 2021 23:50:53 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (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 81B0CE0AAE for ; Fri, 29 Jan 2021 23:50:52 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id EBAA6340FEB for ; Fri, 29 Jan 2021 23:50:50 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 65A0A4AC for ; Fri, 29 Jan 2021 23:50:49 +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: <1611418747.a500400592aaa309602331705b27cdbee8ae58c4.mattst88@gentoo> Subject: [gentoo-commits] proj/catalyst:wip/mattst88 commit in: targets/support/, catalyst/base/ X-VCS-Repository: proj/catalyst X-VCS-Files: catalyst/base/stagebase.py targets/support/chroot-functions.sh X-VCS-Directories: targets/support/ catalyst/base/ X-VCS-Committer: mattst88 X-VCS-Committer-Name: Matt Turner X-VCS-Revision: a500400592aaa309602331705b27cdbee8ae58c4 X-VCS-Branch: wip/mattst88 Date: Fri, 29 Jan 2021 23:50:49 +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: f07d7435-160c-4bac-984d-71edd86c22fd X-Archives-Hash: 0fbaa324fd398db4e0857281dabb25ee Message-ID: <20210129235049.uLribhQP7A3xS5h2b-tlQ9ik0OkpITxy42oAECg4RIE@z> commit: a500400592aaa309602331705b27cdbee8ae58c4 Author: Matt Turner gentoo org> AuthorDate: Mon Jan 18 03:09:30 2021 +0000 Commit: Matt Turner gentoo org> CommitDate: Sat Jan 23 16:19:07 2021 +0000 URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=a5004005 catalyst: Call config_profile_link for all targets 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 gentoo.org> 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