Gentoo Archives: gentoo-dev

From: Andrew Savchenko <bircoph@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Things one could be upset about
Date: Tue, 20 Jan 2015 08:08:32
Message-Id: 20150120110819.bcbac02b6264f9bcec159a66@gentoo.org
In Reply to: Re: [gentoo-dev] Things one could be upset about by "Róbert Čerňanský"
1 On Tue, 20 Jan 2015 07:46:32 +0100 Róbert Čerňanský wrote:
2 > On Tue, 20 Jan 2015 00:14:29 +0300
3 > Andrew Savchenko <bircoph@g.o> wrote:
4 >
5 > > On Mon, 19 Jan 2015 21:44:25 +0100 Róbert Čerňanský wrote:
6 > > > From my point of view it would do much help if portage resolves USE
7 > > > dependencies automatically instead of telling the user to change USE
8 > > > flags manually (I am talking about bug #258371).
9 > >
10 > > As the user the last thing I want is to have some USE flags changed
11 > > without my permission ending up stuff I need to be omitted or stuff
12 > > I don't want to see on my system to be installed. Of course if
13 > > someone prefers USE flags to be randomly changed I don't mind if
14 > > such option will exist (as proposed in bug #258371) as long as it
15 > > is disabled by default.
16 >
17 > Is is of course perfectly fine to have that option disabled by
18 > default. But I am afraid that I do not quite understand yours and
19 > Daniel's concerns. If I paraphrase your statement with regards to
20 > current dependency handling, it is as if you were saying: "I do not
21 > want portage to install any package automatically by its own, I want
22 > to install all the dependencies explicitly."
23
24 The paraphrasing above is wrong. What I want to say is "I don't want
25 portage to automagically change _functionality_ of my packages on
26 its own, even in order to solve dependencies."
27
28 > Why we allow portage to install dependencies and still have things
29 > under control? Well we have --pretend and --ask options and we can
30 > see what would/will be done. This would be the same with USE flags.
31 > You would see in the --pretend output which flags would be changed.
32
33 No this wouldn't be the same. USE flags are _not_ equal to package
34 dependencies, sometimes they will not trigger dependency change at
35 all. USE flags are about _functionality_, dependencies are about
36 the _means_ to implement that functionality (as well as base
37 functionality of a package).
38
39 > To match the package dependency handling, there should be also an
40 > option equivalent to --depclean. It would revert the USE changes
41 > which were done because of dependencies requirements if no longer
42 > needed.
43
44 This will dramatically increase complexity of dependencies metadata
45 as well as of algorithms to handle it (and they are already slow),
46 with no clear benefits therefore. No, thanks.
47
48 > For example, lets have following packages:
49 >
50 > - libbar
51 > - libfoo with IUSE=bar, which depends on: bar? ( libbar )
52 > - foo, which depends on: libfoo[bar]
53 >
54 > USE flag bar is not enabled. You want to install application foo.
55 >
56 > Current behaviour:
57 >
58 > # emerge -av foo
59 > ...
60 > Required USE changes:
61 > libfoo +bar
62 > ... (sorry for not exact emerge output but you get the idea)
63 >
64 > Now, you either fire up your favorite editor and add "libfoo +bar" to
65 > /etc/portage/package.use, re-run emerge and have libbar installed even
66 > you do not want it. The other option is not to install application
67 > foo at all.
68 >
69 > If you choose to emerge it and after year or so you decide to unmerge
70 > it because you do not need it anymore you still will have a leftover
71 > in package.use file - the line "libfoo +foo" even if you run emerge
72 > --depclean.
73 >
74 > New behaviour with automatic USE dependencies resolution:
75 >
76 > emerge -av foo
77 > [ebuild N ] libbar
78 > [ebuild N ] libfoo +bar
79 > [ebuild N ] foo
80 >
81 > Now, you can hit Y if you agree what portage wants to do or N and not
82 > to install foo at all.
83
84 And if I don't agree? What if for some reason I don't want to
85 have libfoo[bar] on my system. What If preferred solution will
86 be not to use libbar at all and to use libclue instread?
87
88 World update on my systems usually involves about 2000 of packages.
89 It's already hard to read emerge -DNuav output in order to check
90 for new packages, dependencies, downgraded and removed packages.
91 Automagick dependency change will make this even harder, much
92 harder because it will involve multiple additional emerge runs in
93 order to deal with issues properly. And each run takes about half
94 an hour.
95
96 Yet again, Gentoo is all about choise. If someone wants that
97 automagick to be implemented, go ahead and send patches for
98 developers to review. But please keep it disabled by default, in
99 most cases it will provide bizarre results anyway. (Think about
100 conflicting alternatives, no sane way to prefer one above another
101 automatically and a chain of such issues during world update.)
102
103 Best regards,
104 Andrew Savchenko

Replies

Subject Author
Re: [gentoo-dev] Things one could be upset about "Róbert Čerňanský" <openhs@×××××××××.com>