Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bugzilla DB migration completed. Please report issues to Infra team via email via or IRC
Bug 16468 - optional dependency inconsistency
Summary: optional dependency inconsistency
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Portage team
Depends on:
Reported: 2003-02-27 07:40 UTC by Johan Verrept
Modified: 2011-10-30 22:37 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Johan Verrept 2003-02-27 07:40:16 UTC
When a package has optional dependencies on packages that have hard dependencies
on a package that is declared 'unwanted' with the USE variable that package is
installed anyway.


emerging mod_php with USE="-X"
This will install X anyway because mod_php has an optional dependency on qt
which, in turn, has a hard dependency on X.

In this case this is still pretty straightforward to find. But, if someone
installs for example PEAR-XML_Tree, which depends on mod_php, this will pull in
X too... unless the user explicitly puts -qt in the USE variable. This is less

As the number of packages and the depth of the dependency tree grows, it is
going to become harder and harder to determine which optional dependency of
which package exactly caused the unwanted package to be installed.
This is a task for the dependency tracking system, not the user.

I would suggest that portage does not install optional package dependencies that
 causes conflicts with the explicit configuration in the USE variable.

  - reduces the number of necessary configuration parameters in the USE variable
considerably and thus make it easier to administer. (as some would imply others:
-X would imply -qt)
  - makes the dependency tree more transparant for the user.
  - causes a minimal amount of packages installed that conflict to chosen
configuration (only those explicitly asked for by the user)
  - causes a maximum amount of packages to be installed that conforms to the
configuration (in contrast to the current situation where a maximum amount of
packages is installed unless explicitly denied at each dependency level)

At the very least I would like to see portage report this to the user and
suggest which extra configuration parameters should be provided to resolve the
configuration conflict.

  - minimal impact on existing behaviour

The coding effort would be approximatly the same for the two options above. (As
the hard part is dermining which optional dependency causes the conflict.)

The easiest implementation would be to use internal trinary logic. A dependency
can be configured as: disabled ( USE="-X" ), enabled ( USE="+X" or USE="X") or
don't care ( USE="").
The system can then flag conflicting configuration and the user can assign
freedom to the system to make decisions. This would only be internal to portage
and would not show up in the ebuilds. (As the 'don't care' level is not relevant
to the package.)

If you have questions or remarks, please mail me soon as I will be offline for 4
weeks from monday 3 march.
Comment 1 Marius Mauch (RETIRED) gentoo-dev 2004-01-12 04:44:18 UTC
USE="-*" is my recommendation for this issue.