OrderWithRequires was introduced in rpm 4.9 (ie. SLE12+) to allow
a package to inform the order of installation of other package without
hard requiring that package. This means our kernel-binary packages no
longer need to hard require perl-Bootloader or dracut, resolving the
long-commented issue there. This is also needed for udev & systemd-boot
to ensure those packages are installed before being called by dracut
(boo#1228659)
---
rpm/kernel-binary.spec.in | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/rpm/kernel-binary.spec.in b/rpm/kernel-binary.spec.in
index 9120e1db930..34d1429449c 100644
--- a/rpm/kernel-binary.spec.in
+++ b/rpm/kernel-binary.spec.in
@@ -221,14 +221,14 @@ Requires: suse-module-tools
# For depmod (modutils is a dependency provided by both module-init-tools and
# kmod-compat)
Requires(post): modutils
-# This Requires is wrong, because the post/postun scripts have a
-# test -x update-bootloader, having perl-Bootloader is not a hard requirement.
-# But, there is no way to tell rpm or yast to schedule the installation
-# of perl-Bootloader before kernel-binary.rpm if both are in the list of
-# packages to install/update. Likewise, this is true for dracut.
-# Need a perl-Bootloader with /usr/lib/bootloader/bootloader_entry
-Requires(post): perl-Bootloader >= 0.4.15
-Requires(post): dracut
+# Use OrderWithRequires to instruct the package manager to schedule the
+# installation of bootloader and dracut related tools as if they were
+# required. This will ensure they're there for post scripts without hard
+# requiring them. (boo#1228659, boo#1240785)
+OrderWithRequires(post): udev
+OrderWithRequires(post): systemd-boot
+OrderWithRequires(post): perl-Bootloader
+OrderWithRequires(post): dracut
# Install the package providing /etc/SuSE-release early enough, so that
# the grub entry has correct title (bnc#757565)
Requires(post): distribution-release
--
2.48.1