Drop update-bootloader --get (poo#1247052) #2

Manually merged
lkocman merged 1 commits from lkocman/grub2-compat-ia32:leap-16.0 into leap-16.0 2026-01-12 17:31:51 +01:00
2 changed files with 22 additions and 7 deletions

View File

@@ -1,3 +1,14 @@
-------------------------------------------------------------------
Mon Nov 24 16:55:15 UTC 2025 - Lubos Kocman <lubos.kocman@suse.com>
- Add update-bootloader also into post and postun Requires
-------------------------------------------------------------------
Mon Aug 4 13:33:31 UTC 2025 - Lubos Kocman <lubos.kocman@suse.com>
- Drop update-bootloader --get as it returns 0
even if the variable is unset
-------------------------------------------------------------------
Thu Jun 26 00:14:04 UTC 2025 - Lubos Kocman <lubos.kocman@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package grub2-compat-ia32
#
# Copyright (c) 2025 SUSE LLC
# Copyright (c) 2025 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -23,8 +23,14 @@ Summary: Enable IA32 emulation support in the kernel
License: MIT
URL: https://en.opensuse.org/GRUB#Enabling_32bit_x86_support_in_Kernel
Source1: README.md
Requires: glibc-32bit
Requires: update-bootloader
adamm_super marked this conversation as resolved Outdated
Outdated
Review

This BuildRequire doesn't seem to be used anywhere. Is this for some post check in the buildenv?

This BuildRequire doesn't seem to be used anywhere. Is this for some post check in the buildenv?
Outdated
Review

@lkocman ping

@lkocman ping

Hello Adam,

i believe there was an idempotency check was failing on this if it wasn't used or similar.
This one needs to go out early as otherwise the GA version of the package doesn't do its job.

Lubos

Hello Adam, i believe there was an idempotency check was failing on this if it wasn't used or similar. This one needs to go out early as otherwise the GA version of the package doesn't do its job. Lubos
Requires(post): update-bootloader
Requires(postun): update-bootloader
BuildRequires: update-bootloader
BuildArch: noarch
ExclusiveArch: x86_64
@@ -45,17 +51,15 @@ cp -a %{SOURCE1} .
%doc README.md
%post
if ! %{_sbindir}/update-bootloader --get-option "ia32_emulation=1" &>/dev/null; then
%{_sbindir}/update-bootloader --add-option "ia32_emulation=1" || :
fi
%{_sbindir}/update-bootloader --config || :
%{_sbindir}/update-bootloader --add-option "ia32_emulation=1"
%{_sbindir}/update-bootloader --config
echo "IA32 emulation has been enabled. Please reboot to apply changes."
%postun
# Only delete the option on uninstall, not upgrade
if [ "$1" -eq 0 ]; then
%{_sbindir}/update-bootloader --del-option "ia32_emulation=1" || :
%{_sbindir}/update-bootloader --config || :
%{_sbindir}/update-bootloader --del-option "ia32_emulation=1"
%{_sbindir}/update-bootloader --config
echo "IA32 emulation has been removed. Please reboot to apply changes."
fi