There are many ebuilds in the tree that have something similar to this in their DEPEND:
test? ( category/foo )
Currently, there is no way to merge these dependencies without setting FEATURES=test, which will run all the tests for all these packages, and pull in their test dependencies. Setting USE=test for either that particular package or globally causes portage to override that setting and remove it, since FEATURES=test is off.
It would be very useful to be able to just pull in the dependencies under test? for a particular package without running the tests for all those dependencies or merging their test dependencies.
Perhaps something along the lines of FEATURES=testdeps that makes it portage pull in only test deps for stuff on the command line.
This would be very useful for ebuild development so one can merge the test deps for the ebuild that is being worked on without their test deps or running their tests.
(In reply to Patrick McLean from comment #0)
> Perhaps something along the lines of FEATURES=testdeps that makes it portage
> pull in only test deps for stuff on the command line.
Is it okay for emerge to remove these test deps when you run emerge --depclean, or in order to solve a blocker conflict encountered when updating your system? If it's not okay to remove them, then we need to specify precisely how they are supposed to be pulled into the dependency graph during future dependency calculations.
That would be fine, they could be merged as if I did an "emerge -1" on them. Basically I am looking for an easy way to get the test deps without getting the test deps for the test deps or running tests on the whole tree.
Another use for this is automated ebuild testing of specific packages.
Based on irc discussion, the plan is to add a new emerge --with-test-deps option which causes test dependencies to get pulled just for packages matched by emerge arguments.
For example, the following command will install the regular dependencies of "foo" as well as the direct test dependencies of "foo":
emerge --onlydeps --with-test-deps foo
I have a patch in the following branch:
I've posted it for review here:
This is in the master branch now:
Fixed in 2.2.15.