[Rpm-maint] [rpm-software-management/rpm] %epoch is defined globally if is set only in one subpackage (#1745)

mikhailnov notifications at github.com
Mon Jul 12 13:56:21 UTC 2021


I am building RPMs from https://abf.io/mikhailnov/kernel-5.4/tree/cd156877bc

The only subpackage that has Epoch is `kernel-headers`:
[1] https://abf.io/mikhailnov/kernel-5.4/blob/cd156877bc/kernel.spec#lc-776

The problem is that it makes ther macro `%epoch` be defined globally.

Some subpackages with kernel modules are generated here:
[2] https://abf.io/mikhailnov/kernel-5.4/blob/cd156877bc/macros.ksobirator#lc-30
[3] https://abf.io/mikhailnov/kernel-5.4/blob/cd156877bc/kernel.spec#lc-840

Macro is defined in [2] and is used in [3]. Macro `%{EVRD}` is used in [2]. It is defined in ROSA and OpenMandriva in `/usr/lib/rpm/openmandriva/macros` as the following:
`%EVRD %{?epoch:%{epoch}:}%{?version:%{version}}%{?release:-%{release}}`

And here the resulting subpackages are not intallable:

```
DEBUG util.py:621:   Problem 1: conflicting requests
DEBUG util.py:621:    - nothing provides kernel-5.4-generic(x86-64) = 1:5.4.130-1 needed by kernel-module-vboxsf-5.4-generic-5.4.130-1.x86_64
DEBUG util.py:621:   Problem 2: conflicting requests
```

It is because it should have required "kernel-5.4-generic(x86-64) = 5.4.130-1" without Epoch.

So, the macro `%epoch` is leaked from a subpackage to the global world.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1745
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20210712/d14626dd/attachment.html>


More information about the Rpm-maint mailing list