qw( mi ),
# Fortran
qw( f for ftn f90 f95 f03 f08 ),
+ # Ada body
+ qw( adb ),
);
my @source_no_preprocess_no_compile = (
# Assembly
qw( s ),
+ # Ada specification
+ qw( ads ),
);
my @source_no_preprocess = (
@source_no_preprocess_compile,
$file = $1;
if (index($next_line, $file) != -1 and $next_line =~ /$cc_regex/o) {
- # We still have to skip the current line as it doesn't contain any
- # compiler commands.
+ # Not a non-verbose line, but we still have to skip the current line
+ # as it doesn't contain any compiler commands.
${$skip_ref} = 1;
return 0;
}
# 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;
+ if (not $arch and index($line, 'Architecture: ') == 0) {
+ $arch = substr $line, 14, -1; # -1 to ignore '\n' at the end
}
# dpkg-buildflags only provides hardening flags since 1.16.1, don't
}
}
- # If hardening wrapper is used (wraps calls to gcc and adds hardening
- # flags automatically) we can't perform any checks, abort.
- if (index($line, 'Build-Depends: ') == 0
- and $line =~ /\bhardening-wrapper\b/) {
- if (not $option_buildd) {
- error_hardening_wrapper();
- $exit |= $exit_code{hardening_wrapper};
- } else {
- print "$buildd_tag{hardening_wrapper}||\n";
+ if (index($line, 'Build-Depends: ') == 0) {
+ # If hardening wrapper is used (wraps calls to gcc and adds
+ # hardening flags automatically) we can't perform any checks,
+ # abort.
+ if ($line =~ /\bhardening-wrapper\b/) {
+ if (not $option_buildd) {
+ error_hardening_wrapper();
+ $exit |= $exit_code{hardening_wrapper};
+ } else {
+ print "$buildd_tag{hardening_wrapper}||\n";
+ }
+ next FILE;
}
- next FILE;
}
# We skip over unimportant lines at the beginning of the log to
# And stop at the end of the build log. Package details (reported by
# the buildd logs) are not important for us. This also prevents false
# positives.
- last if $line =~ /^Build finished at \d{8}-\d{4}$/;
+ last if index($line, 'Build finished at ') == 0
+ and $line =~ /^Build finished at \d{8}-\d{4}$/;
# Detect architecture automatically unless overridden.
if (not $arch
- and $line =~ /^dpkg-buildpackage: host architecture (.+)$/) {
- $arch = $1;
+ and index($line, 'dpkg-buildpackage: host architecture ') == 0) {
+ $arch = substr $line, 37, -1; # -1 to ignore '\n' at the end
}
# Ignore compiler warnings for now.