Gentoo Archives: gentoo-dev

From: Kent Fredric <kentnl@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Proposal: profiles/arches.desc - improve repoman flexibility (with other benefits)
Date: Mon, 27 Mar 2017 07:43:08
Message-Id: 20170327204227.6bad9e72@katipo2.lan
In Reply to: Re: [gentoo-dev] Proposal: profiles/arches.desc - improve repoman flexibility (with other benefits) by Brian Dolbec
1 On Sun, 26 Mar 2017 13:04:18 -0700
2 Brian Dolbec <dolsen@g.o> wrote:
3
4 > While this can be read and split easily in python code. It
5 > is not future proof for additional data being added and/or removed.
6
7 This is why in my earlier comments to this proposal, I asked for
8
9 a: more descriptive terms than 'stable', 'unstable', or 'testing', because they're
10 all contextually ambiguous without inherently clear meaning
11
12 b: a format of <index>\s<fields> where <fields> was a list of space-delimited <key>=<value> pairs.
13
14 This at least means we stop relying on columns for data, and means that the data
15 is also trivially parseable with simple tools like grep/sed.
16
17 Whereas defining it as a multi-line YAML parser may seem great if you can
18 assume every tool at users disposal has YAML parsers and standard YAML parsing libraries,
19 but in reality, some of the tools at our disposal are "bash" and "sed", and decoding
20 and interpreting YAML from Bash is rather complicated.
21
22 ( And there are other fun problems when you start talking about YAML )
23
24 Though, you could cheat and mandate a packed 1-line-per-arch YAML format.
25
26 This, iirc, is legal YAML:
27
28 amd64: {stability: "stable", bits: 64, description: "Includes CPU manufaturers such as Intel, AMD, others...", comments: "The most common/popular arch in the tree...", email: "amd64@..." }
29
30
31 But at that point ...
32
33 s/\b(([^=]+=(\S+)\b/{$1: "$2"}, / && parse_yaml ...