On Tue, Sep 08, 2020 at 12:33:07PM +0200, Christian Kastner wrote: > nocheck > ------- > > A recipe such as > > override_dh_auto_test: > ifeq (,$(filter nocheck,$(DEB_BUILD_PROFILES))) > dh_auto_test > endif > > is sufficient as "dh_auto_test" will honor possibly present _OPTIONS, but
This one is redundant. Anyone setting nocheck in profiles must also set it in options. Since dh_auto_test checks that, the whole ifeq is unnecessary. > override_dh_auto_test: > ifeq (,$(filter nocheck,$(DEB_BUILD_PROFILES))) > custom-test-command > endif > > is not, as "custom-test-command" will be executed even if > DEB_BUILD_OPTIONS=nocheck is set. Yeah, this is just wrong (at present). I do understand that having nocheck both as a profile and an option is confusing. Being on of the people who made us end up here, I do not object to transitioning to a less confusing state. A number of people would like to see nocheck be a profile and not an option. I agree with that goal in principle, but getting there is a lot of effort. We're talking about touching 2300 source packages. Given that people already started using the profile exclusively, we could now deprecate nocheck as an option. That would make us enter a transition period where you must set both and packages should check the profile. After maybe two stable releases, we could MBF the remaining packages. Contrary to earlier such transitions, we now have a mighty tool to do the bulk of the work: The Debian Janitor (thank you again Jelmer!). So maybe this is indeed possible, but I don't feel like driving this. Another aspect that could make it less confusing would be changing canonical entry point for builds. I know that Niels has been working on this. The current entry point is debian/rules and that means, we cannot add any compatibility layer around that. If you'd have to build with dpkg-buildpackage, it could check for the profile and automatically add the option. In any case, we could change both sbuild and pbuilder to do that today. Whenever you go sbuild --profiles=nocheck, it could add the option. > nodoc > ----- > > As recipes frequently follow the pattern of > > override_dh_auto_build: > dh_auto_build > ifeq (,$(filter nodoc,$(DEB_BUILD_PROFILES))) > build-docs-command > endif > > DEB_BUILD_OPTIONS=nodoc gets ignored. This is similar with two major differences: 1. nodoc is much younger. At the time build profiles were added, we couldn't even agree whether it was "nodoc" or "nodocs". 2. nodoc as currently specified may change package contents. It is an unreproducible build profile. I think these are much less useful, because you cannot easily validate them (using reproducible builds). Helmut