Gentoo Archives: gentoo-catalyst

From: Matt Turner <mattst88@g.o>
To: gentoo-catalyst@l.g.o
Cc: Matt Turner <mattst88@g.o>
Subject: [gentoo-catalyst] [PATCH 05/21] catalyst: Switch internal snapshot option parsing to SpecParser
Date: Wed, 20 May 2020 03:42:47
Message-Id: 20200520034226.2870937-5-mattst88@gentoo.org
In Reply to: [gentoo-catalyst] [PATCH 01/21] targets: Remove copy_{file,symlink,lib} functions by Matt Turner
1 The --snapshot/-s option internally creates a .spec file but uses the
2 ConfigParser (nominally used for parsing catalyst.conf) rather than
3 SpecParser (used for parsing .spec files) and as a result has to use
4 '=' rather than ':' as the key/value delimiter.
5
6 Signed-off-by: Matt Turner <mattst88@g.o>
7 ---
8 catalyst/main.py | 6 +++---
9 1 file changed, 3 insertions(+), 3 deletions(-)
10
11 diff --git a/catalyst/main.py b/catalyst/main.py
12 index b01d7a6a..be06ccd7 100644
13 --- a/catalyst/main.py
14 +++ b/catalyst/main.py
15 @@ -291,8 +291,8 @@ def _main(parser, opts):
16
17 mycmdline = list()
18 if opts.snapshot:
19 - mycmdline.append('target=snapshot')
20 - mycmdline.append('snapshot_treeish=' + opts.snapshot)
21 + mycmdline.append('target: snapshot')
22 + mycmdline.append('snapshot_treeish: ' + opts.snapshot)
23
24 conf_values['DEBUG'] = opts.debug
25 conf_values['VERBOSE'] = opts.debug or opts.verbose
26 @@ -354,7 +354,7 @@ def _main(parser, opts):
27
28 if mycmdline:
29 try:
30 - cmdline = catalyst.config.ConfigParser()
31 + cmdline = catalyst.config.SpecParser()
32 cmdline.parse_lines(mycmdline)
33 addlargs.update(cmdline.get_values())
34 except CatalystError:
35 --
36 2.26.2