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 06:46:49
Message-Id: 20150120074632.4d580250@amit.mysel
In Reply to: Re: [gentoo-dev] Things one could be upset about by Andrew Savchenko
1 On Tue, 20 Jan 2015 00:14:29 +0300
2 Andrew Savchenko <bircoph@g.o> wrote:
3
4 > On Mon, 19 Jan 2015 21:44:25 +0100 Róbert Èeròanský wrote:
5 > > From my point of view it would do much help if portage resolves USE
6 > > dependencies automatically instead of telling the user to change USE
7 > > flags manually (I am talking about bug #258371).
8 >
9 > As the user the last thing I want is to have some USE flags changed
10 > without my permission ending up stuff I need to be omitted or stuff
11 > I don't want to see on my system to be installed. Of course if
12 > someone prefers USE flags to be randomly changed I don't mind if
13 > such option will exist (as proposed in bug #258371) as long as it
14 > is disabled by default.
15
16 Is is of course perfectly fine to have that option disabled by
17 default. But I am afraid that I do not quite understand yours and
18 Daniel's concerns. If I paraphrase your statement with regards to
19 current dependency handling, it is as if you were saying: "I do not
20 want portage to install any package automatically by its own, I want
21 to install all the dependencies explicitly."
22
23 Why we allow portage to install dependencies and still have things
24 under control? Well we have --pretend and --ask options and we can
25 see what would/will be done. This would be the same with USE flags.
26 You would see in the --pretend output which flags would be changed.
27
28 To match the package dependency handling, there should be also an
29 option equivalent to --depclean. It would revert the USE changes
30 which were done because of dependencies requirements if no longer
31 needed.
32
33 For example, lets have following packages:
34
35 - libbar
36 - libfoo with IUSE=bar, which depends on: bar? ( libbar )
37 - foo, which depends on: libfoo[bar]
38
39 USE flag bar is not enabled. You want to install application foo.
40
41 Current behaviour:
42
43 # emerge -av foo
44 ...
45 Required USE changes:
46 libfoo +bar
47 ... (sorry for not exact emerge output but you get the idea)
48
49 Now, you either fire up your favorite editor and add "libfoo +bar" to
50 /etc/portage/package.use, re-run emerge and have libbar installed even
51 you do not want it. The other option is not to install application
52 foo at all.
53
54 If you choose to emerge it and after year or so you decide to unmerge
55 it because you do not need it anymore you still will have a leftover
56 in package.use file - the line "libfoo +foo" even if you run emerge
57 --depclean.
58
59 New behaviour with automatic USE dependencies resolution:
60
61 emerge -av foo
62 [ebuild N ] libbar
63 [ebuild N ] libfoo +bar
64 [ebuild N ] foo
65
66 Now, you can hit Y if you agree what portage wants to do or N and not
67 to install foo at all.
68
69 After unmerging it you run emerge --depclean which removes libfoo with
70 its changed USE flag and libbar, no leftovers. (In this case new
71 --use-depclean command is not required since libfoo was removed.)
72
73 If libfoo would not be removed because some other package needs it,
74 then emerge --use-depclean would revert the +bar USE flag to its
75 default state and re-emerge libfoo.
76
77 Robert
78
79
80 --
81 Róbert Èeròanský
82 E-mail: openhs@×××××××××.com
83 Jabber: hs@××××××.sk

Replies

Subject Author
Re: [gentoo-dev] Things one could be upset about Andrew Savchenko <bircoph@g.o>