On Tue, 20 Jan 2015 00:14:29 +0300 Andrew Savchenko <birc...@gentoo.org> wrote:
> On Mon, 19 Jan 2015 21:44:25 +0100 Róbert Čerňanský wrote: > > From my point of view it would do much help if portage resolves USE > > dependencies automatically instead of telling the user to change USE > > flags manually (I am talking about bug #258371). > > As the user the last thing I want is to have some USE flags changed > without my permission ending up stuff I need to be omitted or stuff > I don't want to see on my system to be installed. Of course if > someone prefers USE flags to be randomly changed I don't mind if > such option will exist (as proposed in bug #258371) as long as it > is disabled by default. Is is of course perfectly fine to have that option disabled by default. But I am afraid that I do not quite understand yours and Daniel's concerns. If I paraphrase your statement with regards to current dependency handling, it is as if you were saying: "I do not want portage to install any package automatically by its own, I want to install all the dependencies explicitly." Why we allow portage to install dependencies and still have things under control? Well we have --pretend and --ask options and we can see what would/will be done. This would be the same with USE flags. You would see in the --pretend output which flags would be changed. To match the package dependency handling, there should be also an option equivalent to --depclean. It would revert the USE changes which were done because of dependencies requirements if no longer needed. For example, lets have following packages: - libbar - libfoo with IUSE=bar, which depends on: bar? ( libbar ) - foo, which depends on: libfoo[bar] USE flag bar is not enabled. You want to install application foo. Current behaviour: # emerge -av foo ... Required USE changes: libfoo +bar ... (sorry for not exact emerge output but you get the idea) Now, you either fire up your favorite editor and add "libfoo +bar" to /etc/portage/package.use, re-run emerge and have libbar installed even you do not want it. The other option is not to install application foo at all. If you choose to emerge it and after year or so you decide to unmerge it because you do not need it anymore you still will have a leftover in package.use file - the line "libfoo +foo" even if you run emerge --depclean. New behaviour with automatic USE dependencies resolution: emerge -av foo [ebuild N ] libbar [ebuild N ] libfoo +bar [ebuild N ] foo Now, you can hit Y if you agree what portage wants to do or N and not to install foo at all. After unmerging it you run emerge --depclean which removes libfoo with its changed USE flag and libbar, no leftovers. (In this case new --use-depclean command is not required since libfoo was removed.) If libfoo would not be removed because some other package needs it, then emerge --use-depclean would revert the +bar USE flag to its default state and re-emerge libfoo. Robert -- Róbert Čerňanský E-mail: ope...@tightmail.com Jabber: h...@jabber.sk