On Fri, Jan 12, 2018 at 2:31 AM, Igor Gnatenko ignatenkobrain@fedoraproject.org wrote:
On Mon, 2018-01-08 at 15:00 +0100, nicolas.mailhot@laposte.net wrote:
Hi,
Hello,
I'd like to control auto-dep generation on a subpackage basis.
A Go software unit is just a subdirectory in a specific location. Therefore my current Go autodep attr logic processes all those subdirectories.
Unfortunately unit test files are mixed with normal files in Go.
So, if you separate unit tests in specific subpackages (as current Fedora specs do), there is the risk one of those subpackages will own the same directory as the subpackage containing the main go code. And rpm will then think the unit test subpackage ships the whole Go code unit.
Is there a way to pass a subpackage-specific variable or package name to the dep generator, so it can learn to disable provides for unit tests? (auto requires are fine — unit test code has dep requirements)
As far as I know, RPM passes you list of files and for each file you print its dependencies.
Since Go uses a folder structure to enforce "Go packages", it's absurdly easy to do Provides generation. Requires generation is trickier, but appears to be possible, since I've seen other distributions do it...