summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorNiels Thykier <niels@thykier.net>2018-02-18 08:36:29 +0000
committerNiels Thykier <niels@thykier.net>2018-02-18 08:36:31 +0000
commitbd9fe9460f9fd3dc6bc4a66b66da6e67eb6d5413 (patch)
tree156b9e52bfd9a1a05ffaea4e5bf9d6fe466d776f /lib
parent0bbd3503ce8cb10f3c88079a90eced86a3d12f5e (diff)
downloaddebhelper-bd9fe9460f9fd3dc6bc4a66b66da6e67eb6d5413.tar.gz
Dh_Lib: make pkgfile rely on package_cross_type
During a cross-compilation, if a package is set to compile for TARGET, then we should use the TARGET specific pkgfile rather than the HOST specific one (if any). Signed-off-by: Niels Thykier <niels@thykier.net>
Diffstat (limited to 'lib')
-rw-r--r--lib/Debian/Debhelper/Dh_Lib.pm10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/Debian/Debhelper/Dh_Lib.pm b/lib/Debian/Debhelper/Dh_Lib.pm
index 518358fe..1410a05a 100644
--- a/lib/Debian/Debhelper/Dh_Lib.pm
+++ b/lib/Debian/Debhelper/Dh_Lib.pm
@@ -806,9 +806,10 @@ sub default_sourcedir {
for my $pkg (@{$package}) {
push(@try, "debian/${pkg}.${filename}");
if ($check_expensive) {
+ my $cross_type = uc(package_cross_type($package));
push(@try,
- "debian/${pkg}.${filename}.".hostarch(),
- "debian/${pkg}.${filename}.".dpkg_architecture_value("DEB_HOST_ARCH_OS"),
+ "debian/${pkg}.${filename}.".dpkg_architecture_value("DEB_${cross_type}_ARCH"),
+ "debian/${pkg}.${filename}.".dpkg_architecture_value("DEB_${cross_type}_ARCH_OS"),
);
}
}
@@ -816,9 +817,10 @@ sub default_sourcedir {
# Avoid checking for hostarch+hostos unless we have reason
# to believe that they exist.
if ($check_expensive) {
+ my $cross_type = uc(package_cross_type($package));
push(@try,
- "debian/${package}.${filename}.".hostarch(),
- "debian/${package}.${filename}.".dpkg_architecture_value("DEB_HOST_ARCH_OS"),
+ "debian/${package}.${filename}.".dpkg_architecture_value("DEB_${cross_type}_ARCH"),
+ "debian/${package}.${filename}.".dpkg_architecture_value("DEB_${cross_type}_ARCH_OS"),
);
}
push(@try, "debian/$package.$filename");