]> ruderich.org/simon Gitweb - blhc/blhc.git/blobdiff - bin/blhc
Fix buildd architecture detection.
[blhc/blhc.git] / bin / blhc
index 3ee85373e188ec7e52e18cce100b5294ebe77d5c..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
@@ -729,9 +734,11 @@ foreach my $file (@ARGV) {
             }
         }
 
-        # Debian's build daemons use Build-Depends: for the build
-        # dependencies, but pbuilder just uses Depends:; support both.
-        if (index($line, 'Build-Depends: ') == 0
+        # Debian's build daemons use "Filtered Build-Depends:" (or just
+        # "Build-Depends:" in older versions) for the build dependencies, but
+        # pbuilder uses "Depends:"; support both.
+        if (index($line, 'Filtered Build-Depends: ') == 0
+                or index($line, 'Build-Depends: ') == 0
                 or index($line, 'Depends: ') == 0) {
             # If hardening wrapper is used (wraps calls to gcc and adds
             # hardening flags automatically) we can't perform any checks,