Bug 1212682

Summary: RPM supports non-required transaction order hint (OrderWithRequires)
Product: [openSUSE] openSUSE Tumbleweed Reporter: Andrei Borzenkov <arvidjaar>
Component: KernelAssignee: openSUSE Kernel Bugs <kernel-bugs>
Status: NEW --- QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: tiwai
Version: Current   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Andrei Borzenkov 2023-06-25 05:25:28 UTC
I noticed this in kernel.spec

```
# 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
```

Actually, RPM does support additional ordering hint. See https://rpm-packaging-guide.github.io/

The OrderWithRequires tag for supplying additional ordering hints has been added. The tag follows Requires tag syntax, but does not generate actual dependencies. The ordering hints are treated as if they were Requires when calculating the transaction order, only if the involved packages are present in the same transaction.

I am not sure whether zypper supports it though. The https://bugzilla.opensuse.org/show_bug.cgi?id=1187332 is rather confusing.
Comment 1 Takashi Iwai 2023-07-12 11:43:17 UTC
As far as I understand from the bsc#1187332, zypper (libzypp) doesn't treat OrderWithRequires, and we'd need additional Suggest tag to make zypper working.