diff mbox series

[2/9] UBUNTU: [Packaging] clamp versions to dkms-versions at rules generation time

Message ID 20220914135455.2685644-3-apw@canonical.com
State New
Headers show
Series [1/9] UBUNTU: [Packaging] fix our dh_clean override | expand

Commit Message

Andy Whitcroft Sept. 14, 2022, 1:54 p.m. UTC
When we generate the rules we have the package and version infomation
instantiate this into the rules rather than have those rules use a dirty
(and unreliable) grep for this data.

Signed-off-by: Andy Whitcroft <apw@ubuntu.com>
---
 debian/scripts/gen-rules.lrm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/debian/scripts/gen-rules.lrm b/debian/scripts/gen-rules.lrm
index 223918f..60be0a8 100755
--- a/debian/scripts/gen-rules.lrm
+++ b/debian/scripts/gen-rules.lrm
@@ -140,7 +140,7 @@  EOL
 		cat - >>"debian/rules.gen" <<EOL
 
 # $package $version $suffix_minus $suffix_under
-dkms_nvidia_${suffix_under}_version=\$(shell gawk '/^${package} / { print \$\$2; }' debian/dkms-versions)
+dkms_nvidia_${suffix_under}_version="$version"
 nvidia_${suffix_under}_upstream_version=\$(shell echo "\$(dkms_nvidia_${suffix_under}_version)" | cut -d '-' -f 1)
 gencontrol_flags += -Vdkms:nvidia-${suffix_minus}-modules="nvidia-dkms-${suffix_minus} (= \$(dkms_nvidia_${suffix_under}_version))"
 gencontrol_flags += -Vnvk:nvidia-${suffix_minus}="nvidia-kernel-common-${suffix_minus} (<= \$(nvidia_${suffix_under}_upstream_version)-1), nvidia-kernel-common-${suffix_minus} (>= \$(nvidia_${suffix_under}_upstream_version))"