Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 520652 - merge test deps for a package without merging their test deps or running their tests
Summary: merge test deps for a package without merging their test deps or running thei...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 155723 484436
  Show dependency tree
 
Reported: 2014-08-22 22:38 UTC by Patrick McLean
Modified: 2017-08-11 21:23 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick McLean gentoo-dev 2014-08-22 22:38:33 UTC
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.
Comment 1 Zac Medico gentoo-dev 2014-11-08 04:20:49 UTC
(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.
Comment 2 Patrick McLean gentoo-dev 2014-11-08 07:40:02 UTC
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.
Comment 3 Zac Medico gentoo-dev 2014-11-08 08:07:39 UTC
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
Comment 4 Zac Medico gentoo-dev 2014-11-09 04:52:30 UTC
I have a patch in the following branch:

	https://github.com/zmedico/portage/tree/bug_520652

I've posted it for review here:

	http://thread.gmane.org/gmane.linux.gentoo.portage.devel/4760
Comment 5 Zac Medico gentoo-dev 2014-11-24 07:31:26 UTC
This is in the master branch now:

https://github.com/gentoo/portage/commit/6205081cd90b94ccb12d17784c12b31229eb6b3c
Comment 6 Zac Medico gentoo-dev 2017-08-11 21:23:47 UTC
Fixed in 2.2.15.