Gentoo Archives: gentoo-dev

From: "Róbert Čerňanský" <openhs@×××××××××.com>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Things one could be upset about
Date: Tue, 20 Jan 2015 10:42:51
Message-Id: 20150120114220.000033ea@tightmail.com
In Reply to: Re: [gentoo-dev] Things one could be upset about by Andrew Savchenko
1 On Tue, 20 Jan 2015 11:08:19 +0300
2 Andrew Savchenko <bircoph@g.o> wrote:
3
4 > On Tue, 20 Jan 2015 07:46:32 +0100 Róbert Čerňanský wrote:
5 > > On Tue, 20 Jan 2015 00:14:29 +0300
6 > > Andrew Savchenko <bircoph@g.o> wrote:
7 > > > On Mon, 19 Jan 2015 21:44:25 +0100 Róbert Čerňanský wrote:
8 > > > > From my point of view it would do much help if portage resolves
9 > > > > USE dependencies automatically
10 [...]
11 > > > As the user the last thing I want is to have some USE flags
12 > > > changed without my permission
13 [...]
14 > > Is is of course perfectly fine to have that option disabled by
15 > > default. But I am afraid that I do not quite understand yours and
16 > > Daniel's concerns. If I paraphrase your statement with regards to
17 > > current dependency handling, it is as if you were saying: "I do not
18 > > want portage to install any package automatically by its own, I want
19 > > to install all the dependencies explicitly."
20 >
21 > The paraphrasing above is wrong. What I want to say is "I don't want
22 > portage to automagically change _functionality_ of my packages on
23 > its own, even in order to solve dependencies."
24 >
25 > > Why we allow portage to install dependencies and still have things
26 > > under control? Well we have --pretend and --ask options and we can
27 > > see what would/will be done. This would be the same with USE flags.
28 > > You would see in the --pretend output which flags would be changed.
29 >
30 > No this wouldn't be the same. USE flags are _not_ equal to package
31 > dependencies, sometimes they will not trigger dependency change at
32 > all. USE flags are about _functionality_, dependencies are about
33 > the _means_ to implement that functionality (as well as base
34 > functionality of a package).
35
36 I see your point about functionality. There are USE flags that
37 _changes_ functionality (like threads) and there are others which _adds_
38 functionality (like for example speex adds possibility to play files in
39 that particular format in mplayer). The former I consider similar to
40 package dependencies because they too can add functionality to the
41 system (for example if ruby is installed as dependency it adds
42 possibility to execute ruby scripts) same as those USE flags adds
43 functionality to an application.
44
45 However, even if portage wants me to change USE flag that will change
46 functionality, in 99% of time I end up adding to my package.use what it
47 wants, since my goal is to install some application or update my
48 applications. So just reviewing the changes that portage wants to do
49 and hit Y. And in those rare cases when I really do not want some flag
50 enabled or some package installed I hit N and tweak things.
51
52 > > To match the package dependency handling, there should be also an
53 > > option equivalent to --depclean. It would revert the USE changes
54 > > which were done because of dependencies requirements if no longer
55 > > needed.
56 >
57 > This will dramatically increase complexity of dependencies metadata
58 > as well as of algorithms to handle it (and they are already slow),
59 > with no clear benefits therefore. No, thanks.
60
61 Are you talking about proposed new USE specific depclean option or
62 emerge in general? If it is the new depclean command that would run
63 slow then I am quite sure it will still be faster than me or anyone else
64 going manually through package.use and for each and every USE flag there
65 trying to remove it, run emerge, see if it passes, if not, add it back.
66
67 If it is emerge in general that would be slower that it is still better
68 than run it, see it fail and telling you what USE to change, you making
69 the change, and run it again.
70
71 > > For example, lets have following packages:
72 > >
73 > > - libbar
74 > > - libfoo with IUSE=bar, which depends on: bar? ( libbar )
75 > > - foo, which depends on: libfoo[bar]
76 [...]
77 > > New behaviour with automatic USE dependencies resolution:
78 > >
79 > > emerge -av foo
80 > > [ebuild N ] libbar
81 > > [ebuild N ] libfoo +bar
82 > > [ebuild N ] foo
83 > >
84 > > Now, you can hit Y if you agree what portage wants to do or N and
85 > > not to install foo at all.
86 >
87 > And if I don't agree? What if for some reason I don't want to
88 > have libfoo[bar] on my system. What If preferred solution will
89 > be not to use libbar at all and to use libclue instread?
90
91 In this example, if you do not agree, you have no other option how to
92 install foo (with or without automatic USE deps). Because foo depends
93 on libfoo[bar] unconditionally.
94
95 If however foo would depend either on libfoo[bar] or libclue then the
96 portage would do the same thing as today (I guess it would take the
97 first dependency as mandatory or the one which is already installed if
98 any.) In this case, yes, your preference might be libclue instead what
99 portage chooses. But I see no difference in the way how user choose it
100 comparing to todays '|| ( libfoo libclue )' -like dependencies.
101
102 > World update on my systems usually involves about 2000 of packages.
103 > It's already hard to read emerge -DNuav output in order to check
104 > for new packages, dependencies, downgraded and removed packages.
105 > Automagick dependency change will make this even harder, much
106 > harder because it will involve multiple additional emerge runs in
107 > order to deal with issues properly. And each run takes about half
108 > an hour.
109
110 Hmm, mine is about 1700 and on my 10 years old AMD64 it also takes long
111 time. But my impression is that when portage resolves USE deps
112 automatically it will actually decrease the number of emerge runs.
113 Only in those rare cases when I really do not want some dependency (USE
114 or package) installed on my system and I am prepared to sacrify some of
115 the current functionality to get rid of it I need to tweak and re-run
116 emerge.
117
118 Of course there are blockers, like you pointed out in your other mail
119 with sci-libs/hdf5 and USE flags "cxx threads mpi". But blockers are
120 here even today. And moreover I am not sure what would portage do
121 today in such case. Tell you to enable cxx and mpi, you do it and it
122 will fail again?
123
124 > Yet again, Gentoo is all about choise. If someone wants that
125
126 I agree, but I must say I am quite stunned that there are strong voices
127 against it. I somehow thought that edit the overgrowing package.use
128 file upon each emerge world annoys anyone the same as me.
129
130 How do you handling it? How do you clean it? eix-test-obsolete does
131 not catch unnecessary USE flags there.
132
133 Regards,
134 Robert
135
136
137 --
138 Róbert Čerňanský
139 E-mail: openhs@×××××××××.com
140 Jabber: hs@××××××.sk

Replies

Subject Author
Re: [gentoo-dev] Things one could be upset about Alexey Mishustin <shumkar@×××××××.ru>