It's likely that some virtuals are dependencies of multiple package arguments
to builder and the depgraph would be queried multiple times. This commit
caches the results to avoid expensive duplicate shell execs and optimise for
speed.
Additionally, when calls to equery depgraph match multiple packages (e.g.
the query is for an unversioned atom, and multiple versions exist in the
portage tree), the results for all versions are returned, resulting in
duplicates. This change also strips out the duplicate entries so further
work need only be done once.
This uses perl 5.10's `state` variables, so adds the appropriate use. Since
Sabayon ships only perl 5.20, this should not be an issue.
When calculating the missing dependencies for an ebuild to be installed
by entropy, it's necessary to walk two levels deep minimum to handle meta
packages and split ebuilds. This has a nasty side effect for virtual packages
since all the potential candidates that could satisfy the virtual are
included. This means for anything that has a dependency on virtual/jdk, every
possible jdk is installed side-by-side. For anything that depends on
virtual/mta, every possible mta is installed one by one (because these conflict
and substitute each other, each subsequent install uninstalls the previous
package which is a massive waste of time, bandwidth and effort).
This commit walks through the dependency list looking for any virtual packages.
For each one, the first-level dependencies of the virtual are collected. Only
dependencies of the target package which are not also dependencies of the virtual
are installed. This means only one package that satisfies the virtual will end up
being installed.
When doing repeated testing, the mirrorsort can add unwanted delay.
This commit adds support for setting EQUO_MIRRORSORT=0 to disable this
and use the default sort order while testing.
It preserves the previous behaviour and defaults to 1.
Call to equo query puts arg '--quiet' in the wrong place, receiving
prettified output which doesn't match string comparisons against
package names, leading to all dependencies being reinstalled every
time. This commit puts the --quiet arg in to correct place so that
only missing dependencies are installed.