As a result when a user realizes that a package (which was compiled as a dependency) uses Z use flag, which he does not need, he'll put that in make.conf and them --newuse world just to realize it broke a dependency when running emerge with --depclean. Thus portage should always display the use flags with a special symbol (like `) (in front of every package) to represent the USE which has a hard dependency on some installed package. This mark will be placed in the portage database (for the current system) after installation of a package which has a hard dependency on this USE for a package; that way portage doesn't have to search each time you give it such queries. To do this, you also need to make the --verbose switch work with --search or implement this in eix. Reproducible: Always Steps to Reproduce:
(In reply to comment #0) > As a result when a user realizes that a package (which was compiled as a > dependency) uses Z use flag, which he does not need, he'll put that in > make.conf and them --newuse world just to realize it broke a dependency when > running emerge with --depclean. We already have a message that displays unsatisfied USE dependencies. However, it's always possible that you will do something (change USE) to break the dependency graph if you don't use the --complete-graph option (or --deep + world). > Thus portage should always display the use flags with a special symbol (like `) > (in front of every package) to represent the USE which has a hard dependency on > some installed package. This mark will be placed in the portage database (for > the current system) after installation of a package which has a hard dependency > on this USE for a package; that way portage doesn't have to search each time > you give it such queries. It's possible to create a reverse dependency cache, but there's no point in saving this in /var/db/pkg since that's redundant information. If we create a reverse dependency cache then the mtime information from bug 290428 may be useful for validating the cache. > To do this, you also need to make the --verbose switch work with --search or > implement this in eix. You can already use `emerge -pv --depclean <atom>` to check reverse dependencies of a package. A reverse dependency cache could make it faster.
First the user does need the USE Z on foo as long as the package bar which depends on foo[Z] is installed. The user can - and is encouraged tp - run 'equery depends foo' before changing the USE flag and will see 'bar: foo[Z]' I've just tested it with flightgear depending on openscenegraph[png], added openscenegraph -png to package.use and emerge -avuND world did not show it. Well, emerge -av1 openscenegraph wanted to reinstall with -png. Hm. Does emerge -avuND correct this situation? I would stick with "user should run equery depends before torching the use flags".
(In reply to comment #2) > The user can - and is encouraged tp - run 'equery depends foo' before changing > the USE flag and will see 'bar: foo[Z]' The simplest thing to do is to use the emerge --complete-graph option (not necessary with --deep + world). > I've just tested it with flightgear depending on openscenegraph[png], added > openscenegraph -png to package.use and emerge -avuND world did not show it. That's the same issue as bug 318901. > Well, emerge -av1 openscenegraph wanted to reinstall with -png. Hm. > > Does emerge -avuND correct this situation? Yes, either --complete-graph or --deep + world will work. > I would stick with "user should run equery depends before torching the use > flags". As said, the simplest thing to do is to use the emerge --complete-graph option (not necessary with --deep + world).
"but there's no point in saving this in /var/db/pkg since that's redundant information." Won't the hard use handling be faster after this, I mean, every time emerge will print the use flags of an installed package, users can always see if it's a hard dependency without running equery belongs <package> each time before changing the use. It might not be useful to portage, but to users it will be a major problem off since all these flags will be printed all at once without actually querying for each package individually and checking out it's hard use dependency.
A query will only be done if a user wants to know exactly what package pulls that specific USE in that package.
(In reply to comment #2) > First the user does need the USE Z on foo as long as the package bar which > depends on foo[Z] is installed. > > The user can - and is encouraged tp - run 'equery depends foo' before changing > the USE flag and will see 'bar: foo[Z]' > > I've just tested it with flightgear depending on openscenegraph[png], added > openscenegraph -png to package.use and emerge -avuND world did not show it. > > Well, emerge -av1 openscenegraph wanted to reinstall with -png. Hm. > > Does emerge -avuND correct this situation? > > I would stick with "user should run equery depends before torching the use > flags". > Apparently that's not happening - equery depends sys-apps/hal [ Searching for packages depending on sys-apps/hal... ] app-cdr/k3b-1.91.0_rc2 (sys-apps/hal) app-cdr/xfburn-0.4.3 (hal? sys-apps/hal) app-emulation/virtualbox-ose-3.1.6 (hal? sys-apps/hal) app-emulation/wine-1.1.43 (hal? sys-apps/hal) app-misc/hal-info-20090716 (>=sys-apps/hal-0.5.10) gnome-base/gnome-keyring-2.26.3 (hal? >=sys-apps/hal-0.5.7) media-gfx/gimp-2.6.8 (hal? sys-apps/hal) sys-apps/hwinfo-16.0 (sys-apps/hal) sys-fs/ntfs3g-2010.1.16 (hal? sys-apps/hal) sys-power/pm-utils-1.2.5 (>=sys-apps/hal-0.5.10) x11-base/xorg-server-1.7.6 (hal? sys-apps/hal) x11-drivers/xf86-input-synaptics-1.2.1 (hal? sys-apps/hal) xfce-base/exo-0.3.106 (hal? sys-apps/hal) I'm getting question marks.
(In reply to comment #6) > (In reply to comment #2) > > the USE flag and will see 'bar: foo[Z]' > Apparently that's not happening - > > equery depends sys-apps/hal > [ Searching for packages depending on sys-apps/hal... ] > ... > app-emulation/virtualbox-ose-3.1.6 (hal? sys-apps/hal) > > I'm getting question marks. That's tight, but the message should get transported, right?
No. There're many packages that do not have hard dependency of that use, and it still gets listed.