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 0F18F158091 for ; Fri, 13 May 2022 17:45:20 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 45AEBE08C4; Fri, 13 May 2022 17:45:19 +0000 (UTC) Received: from smtp.gentoo.org (smtp.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 2ED3FE0837 for ; Fri, 13 May 2022 17:45:19 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (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 6554034116D for ; Fri, 13 May 2022 17:45:18 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id CC44D445 for ; Fri, 13 May 2022 17:45:16 +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: <1652463707.ae7d28b81ddc5285a210e927bec563065fda7f16.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: ae7d28b81ddc5285a210e927bec563065fda7f16 X-VCS-Branch: master Date: Fri, 13 May 2022 17:45:16 +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: 12b5dafc-8275-4f2c-a628-879d3e4cdd54 X-Archives-Hash: 54ce1b5768cb067dddce1a18b5a27b28 commit: ae7d28b81ddc5285a210e927bec563065fda7f16 Author: Daniel Cordero 0xdc io> AuthorDate: Thu Apr 21 07:08:23 2022 +0000 Commit: Matt Turner gentoo org> CommitDate: Fri May 13 17:41:47 2022 +0000 URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=ae7d28b8 catalyst/stage4: fix handling of groups, users and keys Previously, the set_*() functions would always set the result of the toml parsing as the setting. Instead, only override it if it is a string. Fixes: 5be6069b ("catalyst: support 3 new options") Signed-off-by: Daniel Cordero 0xdc.io> Signed-off-by: Matt Turner gentoo.org> catalyst/base/stagebase.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py index 5c7e9adb..1d71c59d 100644 --- a/catalyst/base/stagebase.py +++ b/catalyst/base/stagebase.py @@ -589,9 +589,9 @@ class StageBase(TargetBase, ClearBase, GenBase): def set_groups(self): groups = self.settings["spec_prefix"] + "/groups" if groups in self.settings: + self.settings["groups"] = self.settings[groups] if isinstance(self.settings[groups], str): self.settings["groups"] = self.settings[groups].split(",") - self.settings["groups"] = self.settings[groups] del self.settings[groups] else: self.settings["groups"] = [] @@ -600,9 +600,9 @@ class StageBase(TargetBase, ClearBase, GenBase): def set_users(self): users = self.settings["spec_prefix"] + "/users" if users in self.settings: + self.settings["users"] = self.settings[users] if isinstance(self.settings[users], str): self.settings["users"] = self.settings[users].split(",") - self.settings["users"] = self.settings[users] del self.settings[users] else: self.settings["users"] = [] @@ -611,9 +611,9 @@ class StageBase(TargetBase, ClearBase, GenBase): def set_ssh_public_keys(self): ssh_public_keys = self.settings["spec_prefix"] + "/ssh_public_keys" if ssh_public_keys in self.settings: + self.settings["ssh_public_keys"] = self.settings[ssh_public_keys] if isinstance(self.settings[ssh_public_keys], str): self.settings["ssh_public_keys"] = self.settings[ssh_public_keys].split(",") - self.settings["ssh_public_keys"] = self.settings[ssh_public_keys] del self.settings[ssh_public_keys] else: self.settings["ssh_public_keys"] = [] 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 42338158021 for ; Sun, 20 Nov 2022 00:21:31 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7ECC0E0A80; Sun, 20 Nov 2022 00:21:30 +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)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 5DFB2E0A7F for ; Sun, 20 Nov 2022 00:21:30 +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 7CC9F34120D for ; Sun, 20 Nov 2022 00:21:29 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9061975E for ; Sun, 20 Nov 2022 00:21:26 +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: <1652463707.ae7d28b81ddc5285a210e927bec563065fda7f16.mattst88@gentoo> Subject: [gentoo-commits] proj/catalyst:wip/mattst88 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: ae7d28b81ddc5285a210e927bec563065fda7f16 X-VCS-Branch: wip/mattst88 Date: Sun, 20 Nov 2022 00:21:26 +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: a75f360a-2e26-46c5-9861-28cad31aac22 X-Archives-Hash: e94b8108133e0498a2c7245ad0d035fc Message-ID: <20221120002126.OYkHvQbIz-F_Hlkl3hrgcccutrMlCVIYgRnjy8dxzcM@z> commit: ae7d28b81ddc5285a210e927bec563065fda7f16 Author: Daniel Cordero 0xdc io> AuthorDate: Thu Apr 21 07:08:23 2022 +0000 Commit: Matt Turner gentoo org> CommitDate: Fri May 13 17:41:47 2022 +0000 URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=ae7d28b8 catalyst/stage4: fix handling of groups, users and keys Previously, the set_*() functions would always set the result of the toml parsing as the setting. Instead, only override it if it is a string. Fixes: 5be6069b ("catalyst: support 3 new options") Signed-off-by: Daniel Cordero 0xdc.io> Signed-off-by: Matt Turner gentoo.org> catalyst/base/stagebase.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py index 5c7e9adb..1d71c59d 100644 --- a/catalyst/base/stagebase.py +++ b/catalyst/base/stagebase.py @@ -589,9 +589,9 @@ class StageBase(TargetBase, ClearBase, GenBase): def set_groups(self): groups = self.settings["spec_prefix"] + "/groups" if groups in self.settings: + self.settings["groups"] = self.settings[groups] if isinstance(self.settings[groups], str): self.settings["groups"] = self.settings[groups].split(",") - self.settings["groups"] = self.settings[groups] del self.settings[groups] else: self.settings["groups"] = [] @@ -600,9 +600,9 @@ class StageBase(TargetBase, ClearBase, GenBase): def set_users(self): users = self.settings["spec_prefix"] + "/users" if users in self.settings: + self.settings["users"] = self.settings[users] if isinstance(self.settings[users], str): self.settings["users"] = self.settings[users].split(",") - self.settings["users"] = self.settings[users] del self.settings[users] else: self.settings["users"] = [] @@ -611,9 +611,9 @@ class StageBase(TargetBase, ClearBase, GenBase): def set_ssh_public_keys(self): ssh_public_keys = self.settings["spec_prefix"] + "/ssh_public_keys" if ssh_public_keys in self.settings: + self.settings["ssh_public_keys"] = self.settings[ssh_public_keys] if isinstance(self.settings[ssh_public_keys], str): self.settings["ssh_public_keys"] = self.settings[ssh_public_keys].split(",") - self.settings["ssh_public_keys"] = self.settings[ssh_public_keys] del self.settings[ssh_public_keys] else: self.settings["ssh_public_keys"] = [] 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 491DC158090 for ; Fri, 13 May 2022 17:43:50 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5A407E0894; Fri, 13 May 2022 17:43:49 +0000 (UTC) Received: from smtp.gentoo.org (smtp.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 453E7E0894 for ; Fri, 13 May 2022 17:43:49 +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 86490341A70 for ; Fri, 13 May 2022 17:43:47 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D87D2445 for ; Fri, 13 May 2022 17:43:45 +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: <1652463707.ae7d28b81ddc5285a210e927bec563065fda7f16.mattst88@gentoo> Subject: [gentoo-commits] proj/catalyst:stage4-user-groups-fixes 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: ae7d28b81ddc5285a210e927bec563065fda7f16 X-VCS-Branch: stage4-user-groups-fixes Date: Fri, 13 May 2022 17:43:45 +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: 62394e24-db60-4aa4-86ab-f2ebc86451d2 X-Archives-Hash: 9f0836f2c14ba4aeab4e80b48f4f2e1b Message-ID: <20220513174345.7qit-2kjKkB7-q8bsYfYNpuyXm2hjDw7JrcJCj5s_Sc@z> commit: ae7d28b81ddc5285a210e927bec563065fda7f16 Author: Daniel Cordero 0xdc io> AuthorDate: Thu Apr 21 07:08:23 2022 +0000 Commit: Matt Turner gentoo org> CommitDate: Fri May 13 17:41:47 2022 +0000 URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=ae7d28b8 catalyst/stage4: fix handling of groups, users and keys Previously, the set_*() functions would always set the result of the toml parsing as the setting. Instead, only override it if it is a string. Fixes: 5be6069b ("catalyst: support 3 new options") Signed-off-by: Daniel Cordero 0xdc.io> Signed-off-by: Matt Turner gentoo.org> catalyst/base/stagebase.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py index 5c7e9adb..1d71c59d 100644 --- a/catalyst/base/stagebase.py +++ b/catalyst/base/stagebase.py @@ -589,9 +589,9 @@ class StageBase(TargetBase, ClearBase, GenBase): def set_groups(self): groups = self.settings["spec_prefix"] + "/groups" if groups in self.settings: + self.settings["groups"] = self.settings[groups] if isinstance(self.settings[groups], str): self.settings["groups"] = self.settings[groups].split(",") - self.settings["groups"] = self.settings[groups] del self.settings[groups] else: self.settings["groups"] = [] @@ -600,9 +600,9 @@ class StageBase(TargetBase, ClearBase, GenBase): def set_users(self): users = self.settings["spec_prefix"] + "/users" if users in self.settings: + self.settings["users"] = self.settings[users] if isinstance(self.settings[users], str): self.settings["users"] = self.settings[users].split(",") - self.settings["users"] = self.settings[users] del self.settings[users] else: self.settings["users"] = [] @@ -611,9 +611,9 @@ class StageBase(TargetBase, ClearBase, GenBase): def set_ssh_public_keys(self): ssh_public_keys = self.settings["spec_prefix"] + "/ssh_public_keys" if ssh_public_keys in self.settings: + self.settings["ssh_public_keys"] = self.settings[ssh_public_keys] if isinstance(self.settings[ssh_public_keys], str): self.settings["ssh_public_keys"] = self.settings[ssh_public_keys].split(",") - self.settings["ssh_public_keys"] = self.settings[ssh_public_keys] del self.settings[ssh_public_keys] else: self.settings["ssh_public_keys"] = []