Gentoo Archives: gentoo-dev

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Re: Sets in the tree
Date: Wed, 14 Aug 2013 15:29:35
Message-Id: pan$a9628$4b3fa223$5b7a3b1f$52c9e946@cox.net
1 Sergey Popov posted on Wed, 14 Aug 2013 17:07:32 +0400 as excerpted:
2
3 > Why [were sets] not added as a part of the PMS? Some implementation
4 > flaws? Or maybe, architecture problems?
5
6 [TL;DR folks, skip to last paragraph summary.]
7
8 (As a user who has been using sets as they appear in the kde overlay and
9 portage 2.2 for quite some time... This is obviously my opinion based on
10 what I've seen from my vantage-point, and is thus open to correction from
11 those closer to the action.)
12
13 AFAIK, it's several things.
14
15 I believe the first sets implementation was in paludis, with the kde-
16 overlay an early user back when it was first setup and it required
17 paludis.
18
19 When portage implemented sets (and the kde-overlay stopped requiring
20 paludis and began using portage sets as an OPTION to the meta-packages
21 that were also setup there and in the main tree), its implementation was
22 somewhat different, which ended up being a bit awkward, because paludis
23 had implemented them first and so had first-mover default, but portage
24 remains gentoo default PM, but the implementations weren't (fully?)
25 compatible, so it was a bit of a battle of the defaults.
26
27 I believe that's actually one of the big things that kept portage's sets
28 implementation in experimental-masked 2.2 for so long -- at least at
29 first, there was an intention to try to settle on a sets standard that
30 both (plus pkgcore) could implement. But over time it became more and
31 more apparent that simply wasn't going to happen, and for quite some time
32 I at least, thought the feature was doomed to be forever masked.
33
34 Meanwhile, the role of PMS itself became clearer and somewhat more
35 strictly limited, over time. Ciaranm or someone else can probably give a
36 more precise and accurate definition, but as I understand it, basically,
37 PMS is limited to defining the format of ebuilds and the files necessary
38 to support them and package-manager interoperability in-tree, including
39 eclasses, profiles, EAPIs, etc. It does NOT cover individual PM
40 configuration, etc.
41
42 AFAIK, the metadata cache format isn't actually covered by PMS either, as
43 to some extent that's considered private to the PM implementation (and in
44 the absolute, it could almost certainly be improved upon by individual
45 PMs), altho in practice, particularly since it's shipped with the tree,
46 that too must be standardized at least for any PM that doesn't wish to
47 force regeneration of all that data into its own format at every update,
48 when it's already shipped with the tree.
49
50 As it became clear a fully compatible implementation simply wasn't
51 happening, sets ended up in this gap as well. Like the metadata cache,
52 from a certain viewpoint they're arguably a private implementation
53 detail, not subject to interoperability standardization, and I guess this
54 is how things were finally finessed. Of course in practice it would be
55 very nice to have inter-operable compatibility, but for various probably
56 both technical and political reasons, it simply hasn't happened, and I
57 guess the decision finally was to quit letting the impossibly perfect be
58 the enemy of the better-than-what-we-had.
59
60 So while portage-style sets are now (it seems, this is the first I read
61 of it) allowed in-tree, from the PMS angle they remain outside the spec
62 as a PM private implementation detail, and thus cannot fully take the
63 place of meta-packages.
64
65 But as it turns out, meta-packages end up being more flexible and
66 powerful anyway, as (AFAIK, maybe it was added and I missed it) at least
67 portage's sets implementation doesn't have a parallel to a meta-package's
68 USE flags, possible slot deps, etc.
69
70 OTOH, as I've found out here, sets are GREAT for users as a method of
71 subdividing and organizing the formerly monolithic world file. Several
72 years ago now, as it happens when I was working on setting up my netbook
73 and needed to organize my existing world list into categories to better
74 decide what bits of it I wanted on the netbook and what bits not, I split
75 my world file into about a dozen sets by category (using the kde sets as
76 my starting point and pattern), with each former world-file package atom
77 placed into one set or another, and all the sets in turn listed in my
78 world_sets file.
79
80 That makes managing my world list FAR easier, as everything's now
81 categorized. =:^)
82
83 Posting a set file then becomes a simple way of sharing a list of what
84 packages I have installed in a particular category (which may or may not
85 correspond exactly to a tree-package category, in the kde overlay several
86 kde sets compose the larger kde-base package category, for instance).
87
88 Another practical use (extended from the above) I've discovered by actual
89 usage of the kde sets, is that I copy and rename the kde sets to /etc/
90 portage/sets/, and list my renamed versions in my world_sets file. Then
91 I #-comment out individual packages I don't need (as well as libraries,
92 so they're just pulled in as deps), while leaving the line otherwise
93 intact in the file.
94
95 Then every six months when the upstream kde feature release comes out, I
96 diff my custom set against the latest kde overlay set, and any new/
97 renamed/removed packages in the overlay set become immediately apparent,
98 so I can update my custom set accordingly.
99
100 This sort of usage is perfect for sets, allowing me to coordinate with
101 gentoo/kde's package list (in the form of a set) as they adjust to match
102 upstream, without having to screw with USE flags and version-deps, etc,
103 at the same time. The package list is managed separately from the USE
104 flags and version deps, making things much simpler than they'd be if I
105 had to manage them all together, as I would (to some extent or another)
106 were I using the metapackages instead.
107
108
109 So to me anyway, sets fulfill a similar but not identical role to meta-
110 packages, with each having slightly different features and best usages,
111 and while one could be made to stand in for the other, the fit wouldn't
112 be perfect, and it's best if each one is used for the purpose it fits
113 best. Metapackages remain best where USE flags or slot/version deps need
114 to be expressed, while sets are best for simply constructing a list of
115 packages to be installed using separately configured USE flags and
116 version deps, or shared or compared with another such list.
117
118 Given that distinction, the view that sets, as a simple list of packages,
119 really are a PM implementation detail, does seem at least arguable.
120 Having them inter-operable between PMs would definitely be useful, but
121 it's definitely not mandatory, and in fact, given that doesn't appear to
122 be doable in anything approaching a practical timeframe, forcing to wait
123 until that occurred would indeed seem to be letting the impossible
124 perfect be the enemy of the good.
125
126 --
127 Duncan - List replies preferred. No HTML msgs.
128 "Every nonfree program has a lord, a master --
129 and if you use the program, he is your master." Richard Stallman

Replies

Subject Author
Re: [gentoo-dev] Re: Sets in the tree Ciaran McCreesh <ciaran.mccreesh@××××××××××.com>