]> ruderich.org/simon Gitweb - blhc/blhc.git/blobdiff - bin/blhc
Fix buildd architecture detection.
[blhc/blhc.git] / bin / blhc
index 38d0834cd4c1ddc37b70602cf0d186f64fc769ae..9ed648aa1a7be09fabffa22514b7cabb35a87166 100755 (executable)
--- a/bin/blhc
+++ b/bin/blhc
@@ -688,8 +688,13 @@ foreach my $file (@ARGV) {
         # 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 index($line, 'Architecture: ') == 0) {
-            $arch = substr $line, 14, -1; # -1 to ignore '\n' at the end
+        if (not $arch) {
+            if (index($line, 'Build Architecture: ') == 0) {
+                $arch = substr $line, 20, -1; # -1 to ignore '\n' at the end
+            # For old logs (sbuild << 0.63.0-1).
+            } elsif (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