Gentoo Archives: gentoo-dev

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Re: Wishlist: an automated package upgrade system with fine-tunable sysadmin control
Date: Thu, 27 Apr 2006 07:23:11
In Reply to: Re: [gentoo-dev] Wishlist: an automated package upgrade system with fine-tunable sysadmin control by Richard Fish
1 Richard Fish posted
2 <7573e9640604262210v4ec963f0l904bce949be3824f@××××××××××.com>, excerpted
3 below, on Wed, 26 Apr 2006 22:10:27 -0700:
5 > So maybe this could be satisified by allowing user-defined categories
6 > of packages beyond system and world? Something like world, system,
7 > fragile, non-fragile?
9 Actually, that's called set support, and it's actively planned for a
10 future portage. I haven't been tracking it to the point where I know what
11 the implementation status is, but it's very likely in portage-core (aka
12 savior aka portage-ng, portage folks correct me if I'm simply confused) to
13 some extent now. Again, portage-devel would be the preferred place for
14 discussions. (As used to be common courtesy with groups/lists, reading up
15 on the last few weeks to 3 months worth of existing messages before
16 posting something that will then be understood to be a FAQ, is nice, but
17 the devs don't usually bite too hard if you don't. =8^)
19 > I think you could probably implement something like this yourself with
20 > a bit of trickery with the /var/lib/portage/world list. You could
21 > copy world to non-fragile, remove anything that you consider fragile
22 > from it, and then do an "automatic" update with:
23 >
24 > cp /var/lib/portage/world /var/lib/portage/world.bak
25 > cp /var/lib/portage/non-fragile /var/lib/portage/world
26 > emerge -DNuv world
27 > cp /var/lib/portage/world.bak /var/lib/portage/world
28 >
29 > A similar script for the fragile packages would let you update those
30 > as a group, obviously using the -p and/or --ask options as you like.
32 Actually, the idea is slightly more complicated at one step, and slightly
33 less at another, but very workable with existing portage.
35 You can't simply begin with the world file, as that by definition won't
36 necessarily include stuff in system. Rather, begin with the world file,
37 then add the stuff in system. (The best way is probably to walk your
38 profile tree following the parent nodes, and include what you find in
39 packages.)
41 Or, start generate the initial list with an
43 emerge --pretend --emptytree > newpkglist
45 Note that the latter, however, will include "trunk and branch" packages as
46 well as the "leaf" packages normally found in world. This would therefore
47 require the use of --oneshot with any emerge based on the list, so as to
48 prevent stuffing world with unnecessary dependencies. Those dependencies
49 can also change over time, one of the reasons you /don't/ want them in
50 world (and why an occasional emerge --depclean --pretend is recommended as
51 routine system hygiene on a Gentoo system, generating a list to either be
52 added to world or unmerged as necessary, read the docs for more
53 information if you aren't already doing this as part of your normal
54 routine). Due to this change over time, if you use this generation
55 method, you'll also wish to regenerate the list periodically. OTOH, it'll
56 give you a more accurate list to start with, if you consider any of the
57 dependencies especially fragile or robust, since they'd not be directly
58 handled using the first generation method, only treated as dependencies.
60 In any case, once you get your list and weed out the stuff you /don't/
61 want on it, rather than doing that copy trickery, try this:
63 emerge -NuDv $(cat /path/to/listfile)
65 Again, the usual pretend/ask situation applies, and --oneshot should be
66 added since you are updating specific packages from the command line.
67 Also consider the effect of the -D and -N flags, as depending on your
68 exact needs, --newuse and --deep may or may not be suitable.
70 --
71 Duncan - List replies preferred. No HTML msgs.
72 "Every nonfree program has a lord, a master --
73 and if you use the program, he is your master." Richard Stallman in
77 --
78 gentoo-dev@g.o mailing list