Просмотр исходного кода

dpkg-architecture: Initialize DEB_TARGET_ARCH variable w/o DEB_HOST_ARCH

Because the code did not state that the DEB_TARGET_ARCH requires the
DEB_HOST_ARCH variable to be set, it was getting undefined values.

Just initialize to the host value w/o assuming it has already been set.
Guillem Jover лет назад: 11
Родитель
Сommit
8509ed25cc
2 измененных файлов с 3 добавлено и 1 удалено
  1. 2 0
      debian/changelog
  2. 1 1
      scripts/dpkg-architecture.pl

+ 2 - 0
debian/changelog

@@ -23,6 +23,8 @@ dpkg (1.17.17) UNRELEASED; urgency=low
     - New Dpkg::Getopt private module.
   * Set the DEB_TARGET_* dpkg-architecture variables from architecture.mk.
     Missed in dpkg 1.17.14.
+  * Initialize DEB_TARGET_ARCH variable without requiring DEB_HOST_ARCH,
+    which is not being set at all when querying for DEB_TARGET_ variables.
 
   [ Updated programs translations ]
   * German (Sven Joachim).

+ 1 - 1
scripts/dpkg-architecture.pl

@@ -297,7 +297,7 @@ if (action_needs(DEB_HOST | DEB_GNU_INFO)) {
 
 if (action_needs(DEB_TARGET)) {
     if ($req_target_arch eq '') {
-        $v{DEB_TARGET_ARCH} = $v{DEB_HOST_ARCH};
+        $v{DEB_TARGET_ARCH} = $req_host_arch || get_raw_host_arch();
     } else {
         $v{DEB_TARGET_ARCH} = $req_target_arch;
     }