Gentoo Archives: gentoo-portage-dev

From: Duncan <1i5t5.duncan@×××.net>
To: gentoo-portage-dev@l.g.o
Subject: [gentoo-portage-dev] Re: [PATCH] emerge(1): document --oneshot caveats (bug 563482)
Date: Wed, 21 Oct 2015 01:51:47
Message-Id: pan$6cc3c$b1aae966$b735f9cd$d666dbcd@cox.net
In Reply to: Re: [gentoo-portage-dev] [PATCH] emerge(1): document --oneshot caveats (bug 563482) by Rob Wortman
1 Rob Wortman posted on Tue, 20 Oct 2015 17:37:37 -0700 as excerpted:
2
3 > On 2015-10-20 at 21:44:58 +0200, bernalex@g.o wrote:
4 >> (since it's describing somewhat complicated functionality)
5 >
6 > So, I'm curious what's actually going on there. If I emerge packages
7 > with --oneshot, does that create the possibility of broken dependencies
8 > for world-reachable packages, or does updating @world create the
9 > possiblity of broken dependencies for oneshot'ed packages?
10
11 AFAIK, the latter. @world's dep-calc doesn't take into account anything
12 beyond what's in @world (which by definition includes @system and, where
13 appropriate, @profile). So @world should be safe, but packages not in it
14 or deps of what's in it aren't accounted for and both won't be updated,
15 and could be unmerged if the depgraph that portage calculates for @world
16 works most directly by doing so.
17
18 They won't be unmerged unless they're simple-blockers to something,
19 however; that's what depclean is for. It's just that portage doesn't
20 account for them in the depgraph, either, and thus might "accidentally"
21 unmerge them.
22
23
24 Meanwhile, the suggestion that --update --deep avoids the problem is most
25 interesting to me, since all my normally used update-everything scripts
26 have included --deep for nigh on a decade, now, while my normally used
27 named-merge scripts have included --oneshot, since back in the day I
28 didn't want to inadvertently pollute my world file with manually merged
29 deps, and these days I don't even have an @world file, only a world_sets
30 file, which names the various sets I've grouped the contents of both my
31 former @world file and my former @system set (which is nullified, no
32 @system packages at all, here, with everything I decided I actually
33 needed in @world).
34
35 Plus, I reasonably commonly use merged but not assigned to a set packages
36 as a sort of temporary package purgatory, for testing until I've decided
37 I either like the package enough to keep, in which case I add it to the
38 appropriate set as named in @world_sets, or I don't, in which case I
39 simply run depclean and it cleans up both the package and any deps that
40 only it pulled in, without cleaning up anything else, since I always run
41 depclean in --ask mode after an update, simply to keep my system free of
42 any detritus.
43
44 But I'm not sure of the avoidance mechanism, since for all I knew,
45 without @world pinning them in, portage's depgraph didn't include them
46 and that was that, --deep or not.
47
48 So the connection between --deep and --oneshot is new to me, and I'd love
49 to know more about the implications.
50
51 --
52 Duncan - List replies preferred. No HTML msgs.
53 "Every nonfree program has a lord, a master --
54 and if you use the program, he is your master." Richard Stallman