The following commit has been merged in the master branch:
commit f92a24f349082d51b702cd72f59edae005798c79
Author: Guillem Jover <[email protected]>
Date:   Mon Sep 13 18:24:12 2010 +0200

    dpkg-architecture: Set DEB_HOST_ARCH and DEB_HOST_GNU_TYPE only once
    
    The variables are set initially once, and then possibly overriden by the
    user supplied arguments. Rearrange the code to set these only once.

diff --git a/scripts/dpkg-architecture.pl b/scripts/dpkg-architecture.pl
index 09d413c..40b680e 100755
--- a/scripts/dpkg-architecture.pl
+++ b/scripts/dpkg-architecture.pl
@@ -134,9 +134,6 @@ my @ordered = qw(DEB_BUILD_ARCH DEB_BUILD_ARCH_OS 
DEB_BUILD_ARCH_CPU
 $v{DEB_BUILD_ARCH} = get_raw_build_arch();
 $v{DEB_BUILD_GNU_TYPE} = debarch_to_gnutriplet($v{DEB_BUILD_ARCH});
 
-$v{DEB_HOST_ARCH} = get_raw_host_arch();
-$v{DEB_HOST_GNU_TYPE} = debarch_to_gnutriplet($v{DEB_HOST_ARCH});
-
 # Set user values:
 
 if ($req_host_arch ne '' && $req_host_gnu_type eq '') {
@@ -164,8 +161,16 @@ if ($req_host_gnu_type ne '' && $req_host_arch ne '') {
         if $dfl_host_gnu_type ne $req_host_gnu_type;
 }
 
-$v{DEB_HOST_ARCH} = $req_host_arch if $req_host_arch ne '';
-$v{DEB_HOST_GNU_TYPE} = $req_host_gnu_type if $req_host_gnu_type ne '';
+if ($req_host_arch eq '') {
+    $v{DEB_HOST_ARCH} = get_raw_host_arch();
+} else {
+    $v{DEB_HOST_ARCH} = $req_host_arch;
+}
+if ($req_host_gnu_type eq '') {
+    $v{DEB_HOST_GNU_TYPE} = debarch_to_gnutriplet($v{DEB_HOST_ARCH});
+} else {
+    $v{DEB_HOST_GNU_TYPE} = $req_host_gnu_type;
+}
 
 my $gcc = get_gcc_host_gnu_type();
 

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to