From 4deb9febd4e8c52bfa747ac6617e1c778c98646a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Sun, 5 Feb 2023 14:08:46 +0100 Subject: [PATCH] Fix setting VM kernel after rearranging version suffix Usage of shorter release version needs to be adjusted too. Fixes e9bb8f2 "Rearrange version suffix" (cherry picked from commit 9f935d6498f20d8593fd60b38ad8c544684adf73) --- kernel.spec.in | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kernel.spec.in b/kernel.spec.in index 5eb2e7e2..2a25027f 100644 --- a/kernel.spec.in +++ b/kernel.spec.in @@ -629,22 +629,22 @@ if [ "$current_default_package" = "%{name}-qubes-vm" ]; then # If qubes-prefs isn't installed yet, the default kernel will be set by %post # of qubes-core-dom0 -type qubes-prefs &>/dev/null && qubes-prefs --set default-kernel %upstream_version-%plainrel +type qubes-prefs &>/dev/null && qubes-prefs --set default-kernel %upstream_version-%plainrel%{?dist} fi SOURCE_DATE_EPOCH=$(stat -c %%Y %vm_install_dir/initramfs) export SOURCE_DATE_EPOCH -qubes-prepare-vm-kernel --modules-only --include-devel %kernelrelease "%upstream_version-%{plainrel}" +qubes-prepare-vm-kernel --modules-only --include-devel %kernelrelease "%upstream_version-%{plainrel}%{?dist}" exit 0 %preun qubes-vm -if [ "$(qubes-prefs -g default-kernel)" == "%upstream_version-%plainrel" ]; then +if [ "$(qubes-prefs -g default-kernel)" == "%upstream_version-%plainrel%{?dist}" ]; then echo "This kernel version is set as default VM kernel, cannot remove" exit 1 fi -if qvm-ls --kernel | grep -qw "%upstream_version-%plainrel"; then +if qvm-ls --kernel | grep -qw "%upstream_version-%plainrel%{?dist}"; then echo "This kernel version is used by at least one VM, cannot remove" exit 1 fi