public inbox for gentoo-catalyst@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-catalyst] [PATCH 1/2] catalyst.git: Quote toml paths in custom catalyst.conf
@ 2020-05-29 10:05 Daniel Cordero
  2020-05-29 10:05 ` [gentoo-catalyst] [PATCH 2/2] Add shdir to valid config values Daniel Cordero
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Cordero @ 2020-05-29 10:05 UTC (permalink / raw
  To: gentoo-catalyst

From: Daniel Cordero <catalyst@0xdc.io>

With the change to catalyst.conf into TOML format, update the
catalyst.git script to quote paths. The / character is not allowed in
TOML values unless quoted.

fixes: 66e78a8d55d (catalyst: Convert catalyst.conf to TOML)

  NOTICE  : Loading configuration file: /tmp/catalyst.conf.3b5seckb
  CRITICAL: Could not find parse configuration file: /tmp/catalyst.conf.3b5seckb: Invalid date or number (line 1 column 1 char 0)
---
 bin/catalyst.git | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/bin/catalyst.git b/bin/catalyst.git
index 9b3deaa1..071bf58b 100755
--- a/bin/catalyst.git
+++ b/bin/catalyst.git
@@ -27,9 +27,9 @@ def main(argv):
 	with tempfile.NamedTemporaryFile(prefix='catalyst.conf.') as conf:
 		# Set up a config file with paths to the local tree.
 		conf.write(
-			('sharedir=%(source_root)s\n'
-			 'shdir=%(source_root)s/targets\n'
-			 'envscript=%(source_root)s/etc/catalystrc\n'
+			('sharedir="%(source_root)s"\n'
+			 'shdir="%(source_root)s/targets"\n'
+			 'envscript="%(source_root)s/etc/catalystrc"\n'
 			 % {'source_root': source_root}).encode('utf8')
 		)
 		conf.flush()
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-catalyst] [PATCH 2/2] Add shdir to valid config values
  2020-05-29 10:05 [gentoo-catalyst] [PATCH 1/2] catalyst.git: Quote toml paths in custom catalyst.conf Daniel Cordero
@ 2020-05-29 10:05 ` Daniel Cordero
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Cordero @ 2020-05-29 10:05 UTC (permalink / raw
  To: gentoo-catalyst

From: Daniel Cordero <catalyst@0xdc.io>

The catalyst.git script specified this configuration option, which would
not pass validation because shdir was not in the list of
valid_config_file_values.

Add shdir to the list of allowed valid_config_file_values.

Remove shdir from the catalyst.git script anyway, as it would match the default.

Fixes: 8443f89f3c5df (catalyst: Verify config options against valid_config_file_values)

  NOTICE  : Loading configuration file: /tmp/catalyst.conf.tyxsgh1l
  CRITICAL: Unknown option 'shdir' in config file /tmp/catalyst.conf.tyxsgh1l
---
 bin/catalyst.git     | 1 -
 catalyst/defaults.py | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/catalyst.git b/bin/catalyst.git
index 071bf58b..29b72c30 100755
--- a/bin/catalyst.git
+++ b/bin/catalyst.git
@@ -28,7 +28,6 @@ def main(argv):
 		# Set up a config file with paths to the local tree.
 		conf.write(
 			('sharedir="%(source_root)s"\n'
-			 'shdir="%(source_root)s/targets"\n'
 			 'envscript="%(source_root)s/etc/catalystrc"\n'
 			 % {'source_root': source_root}).encode('utf8')
 		)
diff --git a/catalyst/defaults.py b/catalyst/defaults.py
index 14f671fe..b5026e95 100644
--- a/catalyst/defaults.py
+++ b/catalyst/defaults.py
@@ -18,6 +18,7 @@ valid_config_file_values = frozenset([
     "repo_name",
     "repos",
     "sharedir",
+    "shdir",
     "storedir",
     "target_distdir",
     "target_pkgdir",
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-05-29 10:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-29 10:05 [gentoo-catalyst] [PATCH 1/2] catalyst.git: Quote toml paths in custom catalyst.conf Daniel Cordero
2020-05-29 10:05 ` [gentoo-catalyst] [PATCH 2/2] Add shdir to valid config values Daniel Cordero

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox