Ubuntu MOTU Application

Łukasz 'sil2100' Zemczak lukasz.zemczak at canonical.com
Wed May 21 14:18:07 UTC 2014


Hi!

On 21.05.2014 12:21, Iain Lane wrote:
> On Mon, May 19, 2014 at 04:17:41PM +0100, Dimitri John Ledkov wrote:
>> On 19 May 2014 15:32, Łukasz 'sil2100' Zemczak
>> <lukasz.zemczak at canonical.com> wrote:
>>>
>>> Not sure if I answered the question though!
>>>
>>
>> Both answers sound good to me and imho are sufficient. I was hoping
>> you would mention DEB_BUILD_OPTIONS, but you gave an example that
>> honors that interface anyway.
> 
> It's an interesting point though—Łukasz, can you explain what
> DEB_BUILD_OPTIONS is for please and give a quick example of how you
> might use 'nocheck' from it in a rules file? Brief answers and a small
> snippet will be fine here.
> 
> I think this is important for people to understand as I've had to fix
> quite a few packages for this in recent times.
> 

I must say that personally I didn't use DEB_BUILD_OPTIONS directly yet,
but I have seen it being used in some existing packages.

Generally DEB_BUILD_OPTIONS can be used to force specific behavior
during package build, i.e. disabling tests, disabling optimization and
others (used even like `DEB_BUILD_OPTIONS=nocheck debuild`). It's a
recommendation, so basically a package is not forced to support this and
normally it needs to be supported manually in debian/rules.
Of course, debhelper 'helps out' by handling the 'nocheck' build option
itself, not running tests when it's specified.

But in case of not relying on dh_auto_test, this can generally look like
this:

ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
  make check # or make check or anything else that's defined
endif

Best regards,

-- 
Łukasz 'sil2100' Zemczak
 lukasz.zemczak at canonical.com
 www.canonical.com




More information about the Devel-permissions mailing list