From ebc2f12e8c514ef9ceb50c58bb76a50f910293cb Mon Sep 17 00:00:00 2001 From: Andrea Righi Date: Mon, 22 May 2023 13:14:03 +0200 Subject: [PATCH] UBUNTU: [Packaging] generate linux-lib-rust only on amd64 BugLink: https://bugs.launchpad.net/bugs/2020356 Rust is only supported by amd64 at the moment, so there is no reason to generate linux-lib-rust packages on the other architectures. This can prevent generating empty packages or even build errors. Signed-off-by: Andrea Righi --- debian/rules.d/2-binary-arch.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk index 630a335616a7..b796e67dadb1 100644 --- a/debian/rules.d/2-binary-arch.mk +++ b/debian/rules.d/2-binary-arch.mk @@ -132,7 +132,9 @@ $(stampdir)/stamp-install-%: $(stampdir)/stamp-build-% $(stampdir)/stamp-install dh_prep -p$(bin_pkg_name)-$* dh_prep -p$(mods_pkg_name)-$* dh_prep -p$(hdrs_pkg_name)-$* +ifeq ($(build_arch),x86) dh_prep -p$(rust_pkg_name)-$* +endif $(foreach _m,$(all_standalone_dkms_modules), \ $(if $(enable_$(_m)),dh_prep -p$(dkms_$(_m)_pkg_name)-$*;)\ ) @@ -675,7 +677,9 @@ endif $(call dh_all,$(pkgbldinfo)) $(call dh_all,$(pkghdr)) +ifeq ($(build_arch),x86) $(call dh_all,$(pkgrust)) +endif ifneq ($(skipsub),true) @set -e; for sub in $($(*)_sub); do \