# 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
# 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.