On Sat, Sep 26, 2015 at 09:17:00AM +0200, Niels Thykier wrote:
> Hi Simon,
>
> Thanks for your interest in improving debhelper.
>
> To be honest, I am quite conflicted with this change.
>
>  * Adding it directly in dpkg-buildpackage would give you a lot better
>    coverage.
>    - Have you proposed this to the dpkg maintainers?

Hello Niels,

I first thought adding it to dpkg-buildpackage won't work, due to
the following issue: The actually used flags are only known
"inside" debian/rules (via environment variables like
DEB_BUILD_MAINT_OPTIONS or DEB_flag_MAINT_PREPEND etc.). Calling
just dpkg-buildflags from dpkg-buildpackage will only show the
default flags. What's necessary is to run dpkg-buildflags from
debian/rules for the proper environment, without modifying the
file itself.

But I think I've found a solution which can be run from
dpkg-buildpackage:

    my $x = "
    include debian/rules

    .PHONY: run-dpkg-buildflags-status
    run-dpkg-buildflags-status:
            @dpkg-buildflags --status
    ";
    system('make', '--eval', $x, 'run-dpkg-buildflags-status');

Suggestions to improve this are very welcome.

I've provided a patch for dpkg-buildpackage in #800069, so please
close this bug. Sorry for not thinking about it earlier and
wasting your time.

Regards
Simon
-- 
+ privacy is necessary
+ using gnupg http://gnupg.org
+ public key id: 0x92FEFDB7E44C32F9

Attachment: signature.asc
Description: PGP signature

Reply via email to