summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2014-10-11 17:40:36 +0200
committerGuillem Jover <guillem@debian.org>2014-10-12 06:08:00 +0200
commit0a2a1af94495be0b8204f827abc09e20a11dd447 (patch)
treee403ca6619345fecd118b1f60b94b2298b9b75f0 /scripts
parent8509ed25cc643a93bfc8beaecfe2f4de7d584f9a (diff)
downloaddpkg-0a2a1af94495be0b8204f827abc09e20a11dd447.tar.gz
dpkg-architecture: Use || instead of conditional to assign _ARCH variables
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/dpkg-architecture.pl18
1 files changed, 4 insertions, 14 deletions
diff --git a/scripts/dpkg-architecture.pl b/scripts/dpkg-architecture.pl
index dcc300ff4..431e07dd6 100755
--- a/scripts/dpkg-architecture.pl
+++ b/scripts/dpkg-architecture.pl
@@ -254,13 +254,8 @@ if (action_needs(DEB_BUILD | DEB_GNU_INFO)) {
# Proceed to compute the host variables if needed.
-if (action_needs(DEB_HOST)) {
- if ($req_host_arch eq '') {
- $v{DEB_HOST_ARCH} = get_raw_host_arch();
- } else {
- $v{DEB_HOST_ARCH} = $req_host_arch;
- }
-}
+$v{DEB_HOST_ARCH} = $req_host_arch || get_raw_host_arch()
+ if (action_needs(DEB_HOST));
($abi, $v{DEB_HOST_ARCH_OS}, $v{DEB_HOST_ARCH_CPU}) = debarch_to_debtriplet($v{DEB_HOST_ARCH})
if (action_needs(DEB_HOST | DEB_ARCH_INFO));
($v{DEB_HOST_ARCH_BITS}, $v{DEB_HOST_ARCH_ENDIAN}) = debarch_to_cpuattrs($v{DEB_HOST_ARCH})
@@ -295,13 +290,8 @@ if (action_needs(DEB_HOST | DEB_GNU_INFO)) {
# Proceed to compute the target variables if needed.
-if (action_needs(DEB_TARGET)) {
- if ($req_target_arch eq '') {
- $v{DEB_TARGET_ARCH} = $req_host_arch || get_raw_host_arch();
- } else {
- $v{DEB_TARGET_ARCH} = $req_target_arch;
- }
-}
+$v{DEB_TARGET_ARCH} = $req_target_arch || $req_host_arch || get_raw_host_arch()
+ if (action_needs(DEB_TARGET));
($abi, $v{DEB_TARGET_ARCH_OS}, $v{DEB_TARGET_ARCH_CPU}) = debarch_to_debtriplet($v{DEB_TARGET_ARCH})
if (action_needs(DEB_TARGET | DEB_ARCH_INFO));
($v{DEB_TARGET_ARCH_BITS}, $v{DEB_TARGET_ARCH_ENDIAN}) = debarch_to_cpuattrs($v{DEB_TARGET_ARCH})