On Tue, Sep 08, 2020 at 12:33:07PM +0200, Christian Kastner wrote: > On 2020-09-08 08:36, Niels Thykier wrote: > > Fundamentally, the difference between the two are: > > > > * _PROFILES is a "new"[0] thing with a specific purpose to reduce > > build-dependencies (at least in this case). It ends up in d/rules > > for skipping builds of specific packages (e.g. "nopython") > > > > * _OPTIONS is the thing that has been here since the "dawn of time" to > > enable the builder to tweak the build in a standardized way. > > > > (Note that their definitions do not overlap) > > > > Basically, we ended up in the situation like this with nocheck[1]: > > > > * We had _OPTIONS with nocheck for at least a decade and probably more. > > - I.e. _OPTIONS is what everyone wrote in their d/rules file to > > implement policy. > > > > * We invented _PROFILES and supported nocheck to assist cross-builders > > and bootstrappers, who generally want as few build-depends as > > possible even at the expense of running tests (cross-builders often > > cannot run them anyway). > > - I.e. _PROFILES is what the dependency resolvers look for when > > deciding which build-depends to install. > > > > And that is how you end up with WET Debian packaging. > > > > I hope that cleared the relationship between _OPTIONS and _PROFILES and > > how we got here. > > Yes, thank you for the background -- that was really helpful. > > Coming back to the practical problem from a maintainer's point of view, > unless I'm mistaken, that means: > > > 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 > > 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. > > > 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. > > > vice versa > ----------- > And the same applies when _OPTIONS is filtered instead of _PROFILES. > > > Did I get that right?
Just as a data point: for some time now I've been checking both variables with a single check :) ifeq (,$(filter nodoc,${DEB_BUILD_OPTIONS} ${DEB_BUILD_PROFILES})) ... endif ...does the job, with some possible overkill, but, hey, it works. G'luck, Peter -- Peter Pentchev r...@ringlet.net r...@debian.org p...@storpool.com PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint 2EE7 A7A5 17FC 124C F115 C354 651E EFB0 2527 DF13
signature.asc
Description: PGP signature