Gentoo Archives: gentoo-portage-dev

From: Alec Warner <antarus@g.o>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [SoC] Idea for emerge
Date: Sun, 25 Mar 2007 18:45:49
Message-Id: 44786.67.180.39.52.1174848304.squirrel@webmail.scriptkitty.com
In Reply to: Re: [gentoo-portage-dev] [SoC] Idea for emerge by Simon Lipp
1 >> and I'd assume users might get rather confused to answer questions
2 >> that are then thrown away later.
3 > I don't unterstand what do you mean by that...
4 >
5
6 It's a chicken and egg problem. Portage's job is to examine your systems
7 configuration (key here is USE flags) and the calculate dependences based
8 on those flags (among other things). So in order for your idea to work
9 with 1 round of dependency resolution; emerge basically needs a
10 backtracking dependency resolver. Take the following use case for
11 example.
12
13 new-awesome-emerge foo
14
15 foo has 3 use flags, [bar,-baz,-snuffles], bar is enabled by your existing
16 configuration.
17
18 Do you wish to enable baz? (Y/N): Y
19 Do you wish to enable snuffles? (Y/N): Y
20
21 * At this point because you have changed USE flags you have invalidated
22 the previous dependency graph (new USE flags enabled means new deps might
23 get pulled in or excluded). So every time someone adds (or removes) a
24 flag you need to recalculate deps or your dependency tree will be wrong.
25
26 This whole issue can be solved by adding or removing flags from
27 /etc/portage/package.use instead of /etc/make.conf
28
29 However this leads us into the next point.
30
31 >> Another (relatively minor) problem
32 >> is that the flags set in such a session would have to be made
33 >> persistent somehow, and I wouldn't want emerge to mess
34 >> with /etc/portage/package.* files
35 > Why ? it's just doing something the user will normally do....
36 >
37
38 It's been a long standing policy not to touch user configuration. I can
39 think of only 1 instance when we currently do it and thats when we process
40 updates/ and notice a package move; we have to rename that CP in all
41 configurations so the user doesn't get their system in a weird state. The
42 problem with editing stuff like this is usually that when users and
43 machines edit the same file; bad things happen. It is hard for the
44 machine to know what the user is doing in there; and vice versa.
45
46 >> As for listing USE flag descriptions, there are already
47 >> patches floating around for that (at least TGL wrote one a while
48 >> ago), and even if not it would be hardly worth a complete SoC project
49 >> by itself.
50 > My idea was to integrate this with emerge, and this seemed something
51 > not very easy. But I totally agree that it's very easy (too for the SoC)
52 > to make an external tool to do that. So, since you think that emerge is
53 > not a place for that, I'll search for a new idea for the SoC and try to
54 > make this simple tool next week ;)
55
56 Emerge is a big piece of shit (honestly) and it does way too much already,
57 no need to add more stuff to it, imho. The biggest problem you will
58 encounter is that adding and removing use flags is an interative process.
59
60 -Alec
61
62
63 --
64 gentoo-portage-dev@g.o mailing list