my $harden_pie = $option_pie; # defaults to 0
while (my $line = <$fh>) {
+ # Detect architecture automatically unless overridden. For buildd logs
+ # only, doesn't use the dpkg-buildpackage header. Necessary to ignore
+ # build logs which aren't built (wrong architecture, build error,
+ # etc.).
+ if (not $arch
+ and $line =~ /^Architecture: (.+)$/) {
+ $arch = $1;
+ }
+
# dpkg-buildflags only provides hardening flags since 1.16.1, don't
# check for hardening flags in buildd mode if an older dpkg-dev is
# used. Default flags (-g -O2) are still checked.
use strict;
use warnings;
-use Test::More tests => 134;
+use Test::More tests => 136;
sub is_blhc {
. "ignoring architecture 'mipsel'\n"
;
+is_blhc 'buildd-dpkg-dev', '--ignore-arch i386', 0,
+ "ignoring architecture 'i386'\n";
+
# debian