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.
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.