The following commit has been merged in the master branch:
commit 4cc8a1748fc3d8b35cb35ea2c065c9269065b4d3
Author: Guillem Jover <guil...@debian.org>
Date:   Thu Mar 8 01:51:33 2012 +0100

    dpkg-buildflags: Handle unknown architectures gracefully
    
    Give a warning and reset the abi-os-cpu tuple to empty strings.
    
    Closes: #663004

diff --git a/debian/changelog b/debian/changelog
index 1c72e84..6a8b33a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -60,6 +60,8 @@ dpkg (1.16.2) UNRELEASED; urgency=low
   * Relax --merge-avail Packages file parser, to not fail on bogus versions.
   * When building only arch-indep binaries with «dpkg-buildpackage -A», name
     the .changes file using ‘all’ as architecture. Closes: #661638
+  * Handle unknown architectures gracefully in dpkg-buildflags.
+    Closes: #663004
 
   [ Raphaël Hertzog ]
   * Update Dpkg::Shlibs to look into multiarch paths when cross-building
diff --git a/scripts/Dpkg/Vendor/Debian.pm b/scripts/Dpkg/Vendor/Debian.pm
index 537293f..b4ce4cf 100644
--- a/scripts/Dpkg/Vendor/Debian.pm
+++ b/scripts/Dpkg/Vendor/Debian.pm
@@ -83,6 +83,11 @@ sub add_hardening_flags {
     my $arch = get_host_arch();
     my ($abi, $os, $cpu) = debarch_to_debtriplet($arch);
 
+    unless (defined $abi and defined $os and defined $cpu) {
+        warning(_g("unknown host architecture '%s'"), $arch);
+        ($abi, $os, $cpu) = ("", "", "");
+    }
+
     # Features enabled by default for all builds.
     my %use_feature = (
        "pie" => 0,

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to debian-dpkg-cvs-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to