diff mbox series

[V2,3/6,SRU,Unstable] UBUNTU: [Packaging] add rprovides= in dkms-versions

Message ID 20220422171021.2382248-9-vicamo.yang@canonical.com
State New
Headers show
Series None | expand

Commit Message

You-Sheng Yang April 22, 2022, 5:10 p.m. UTC
From: "You-Sheng Yang (vicamo)" <vicamo.yang@canonical.com>

BugLink: https://bugs.launchpad.net/bugs/1969434

Signed-off-by: You-Sheng Yang (vicamo) <vicamo.yang@canonical.com>
---
 debian/dkms-versions            | 4 ++--
 debian/rules.d/0-common-vars.mk | 1 +
 debian/rules.d/2-binary-arch.mk | 3 +--
 3 files changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/debian/dkms-versions b/debian/dkms-versions
index f6dfa126a3d9..28408b5b3ccb 100644
--- a/debian/dkms-versions
+++ b/debian/dkms-versions
@@ -1,2 +1,2 @@ 
-v4l2loopback 0.12.5-1ubuntu5 modulename=v4l2loopback debpath=pool/universe/v/v4l2loopback/v4l2loopback-dkms_0.12.5-1ubuntu5_all.deb
-zfs-linux 2.1.2-1ubuntu3 modulename=zfs debpath=pool/universe/z/zfs-linux/zfs-dkms_2.1.2-1ubuntu3_all.deb
+v4l2loopback 0.12.5-1ubuntu5 modulename=v4l2loopback debpath=pool/universe/v/v4l2loopback/v4l2loopback-dkms_0.12.5-1ubuntu5_all.deb rprovides=v4l2loopback-modules rprovides=v4l2loopback-dkms
+zfs-linux 2.1.2-1ubuntu3 modulename=zfs debpath=pool/universe/z/zfs-linux/zfs-dkms_2.1.2-1ubuntu3_all.deb rprovides=spl-modules rprovides=spl-dkms rprovides=zfs-modules rprovides=zfs-dkms
diff --git a/debian/rules.d/0-common-vars.mk b/debian/rules.d/0-common-vars.mk
index 7cd84e4540bd..fcbfffc06eba 100644
--- a/debian/rules.d/0-common-vars.mk
+++ b/debian/rules.d/0-common-vars.mk
@@ -305,4 +305,5 @@  $(foreach _line,$(shell gawk '{ OFS = "!"; $$1 = $$1; print }' $(DROOT)/dkms-ver
     , \
     $(error debpath for $(_deb_pkgname) not specified.) \
   ) \
+  $(eval dkms_$(_m)_rprovides = $(patsubst rprovides=%,%,$(filter rprovides=%,$(_params)))) \
 )
diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
index 5fe6f2a84169..7f22fc5d4b68 100644
--- a/debian/rules.d/2-binary-arch.mk
+++ b/debian/rules.d/2-binary-arch.mk
@@ -604,8 +604,7 @@  binary-%: pkgcloud = $(cloud_flavour_pkg_name)-$*
 $(foreach _m,$(all_dkms_modules), \
   $(eval binary-%: enable_$(_m) = $$(filter true,$$(call custom_override,do_$(_m),$$*))) \
 )
-binary-%: rprovides = $(if $(enable_zfs),spl-modules$(comma) spl-dkms$(comma) zfs-modules$(comma) zfs-dkms$(comma)) \
-		$(if $(enable_v4l2loopback),v4l2loopback-modules$(comma) v4l2loopback-dkms$(comma))
+binary-%: rprovides = $(foreach _m,$(all_dkms_modules),$(if $(enable_$(_m)),$(foreach _r,$(dkms_$(_m)_rprovides),$(_r)$(comma) )))
 binary-%: target_flavour = $*
 binary-%: checks-%
 	@echo Debug: $@