Gentoo Archives: gentoo-dev

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Re: About using USE flags to pull in needed RDEPENDs being discouraged by devmanual
Date: Sat, 16 Jun 2012 21:57:56
Message-Id: pan.2012.06.16.21.56.30@cox.net
In Reply to: Re: [gentoo-dev] About using USE flags to pull in needed RDEPENDs being discouraged by devmanual by Pacho Ramos
1 Pacho Ramos posted on Sat, 16 Jun 2012 18:30:55 +0200 as excerpted:
2
3 >> > 2. If user emerges ppp, it will be recorded in world file and, then,
4 >> > if in the future he removes bluez, emerge --depclean want clean no
5 >> > longer needed ppp and then, people end up with a lot of packages they
6 >> > needed to manually emerge some year but that they problem no longer
7 >> > need at all.
8 >>
9 >> It's not our job to maintain users world files.
10 >>
11 >>
12 >>
13 > Even for me I tend to periodically check world files of machines I
14 > maintain, and it's tedious, we shouldn't promote people to easily
15 > contaminate their world files. Currently, most people will end up having
16 > a lot of unneeded packages installed in their systems after years of
17 > usage due this way of happily telling people to install some random
18 > packages to get extra support.
19
20 Looking at the broader picture, the problem of extraneous packages in the
21 world file has always concerned me. If it were to be done over again,
22 and I think Zac would likely agree, emerge would use --oneshot by
23 default, so as not to contaminate the world file unnecessarily. Then
24 there'd be a different option (say -2) to add the package to the world
25 file if that's what was actually intended.
26
27 That's actually how I have my emerge front-end scriptlets/aliases setup
28 here. -1 is the default; if I want it in the world file I use the *2
29 script variant, which omits the -1.
30
31 But of course changing behavior in mid-stream doesn't work so well, so
32 emerge continues to stick stuff in the world file by default.
33
34
35 Meanwhile, one coming solution to this, in portage 2.2 anyway, is sets.
36 Since I've been working with kde4 since it was overlay-only and sets-
37 only, no meta-packages, I've been using sets for quite awhile and it's
38 now entirely integrated into how I work with portage.
39
40 When I setup my netbook on gentoo, I wanted most of the same setup as on
41 my main machine, but with some differences, so I had to go thru the main
42 machine's world file and pick and choose what I needed.
43
44 What I quickly realized is that my kde packages were already nicely
45 categorized into sets, so all I really needed to do was split up the rest
46 of the world file into a bunch of other sets, by category. So for
47 instance:
48
49 $>>cat /etc/portage/sets/jed.dev
50 dev-util/ccache
51 dev-util/desktop-file-utils
52 dev-vcs/git
53 sys-devel/bin86
54 sys-devel/gcc
55 sys-devel/gdb
56
57
58 I have 24 such sets including my (customized) kde sets. All packages
59 formerly listed in the world file are found in these sets, instead, and
60 of course the sets are in turn listed in /var/lib/portage/world_sets.
61
62 My world file is normally entirely empty, tho I do use it occasionally
63 for packages I haven't decided whether I want to keep or not, but want to
64 protect from --depclean, which I run after each update. So my world file
65 serves as a kind of package purgatory, until I decide whether it's going
66 to be a part of my normal system, or removed.
67
68 The sets, meanwhile, break the former world file down into much more
69 manageable categorized chunks, each of which is short enough and
70 categorized specifically enough that if a package is no longer needed, it
71 immediately sticks out like a sore thumb, as it's not lost among the
72 noise of hundreds of "twisty packages, all different". =:^)
73
74
75 While not a direct solution to the problem at hand, proper use of sets
76 WILL and DOES dramatically ease gentoo world-package administration,
77 going a long way toward eliminating crufty world lists simply by allowing
78 them to be cut into nice little chunks that can be categorized in ways
79 that make sense for an individual site, so the cruft sticks out like the
80 sore thumb it can really be, and is thus easily found and removed.
81
82
83 Meanwhile, another bonus of sets is the extra protection it gives you if
84 you try to emerge -C something in a sets file (as opposed to the world
85 file itself). =:^) Seeing that warning that the package is in a set and
86 can't be directly unmerged is rather like seeing the warning that it's in
87 @system, except that user sets are easier to directly manage, and it has
88 saved my butt a couple times when I was really too sleepy to be adminning
89 the system in the first place. But it's easy enough to remove (or
90 comment) that line from the set, if removal is really intended, and
91 that's what would ultimately need to be done anyway, to prevent it
92 getting remerged.
93
94
95 Unfortunately, it has begun to look like sets are where baselayout2 and
96 openrc were for many years, "forever coming, never getting here", at
97 least for stable or even unmasked into ~arch. =:^(
98
99 --
100 Duncan - List replies preferred. No HTML msgs.
101 "Every nonfree program has a lord, a master --
102 and if you use the program, he is your master." Richard Stallman

Replies