Packaging: why does the RPM spec have both Provides & Obsoletes for the same packages?
Geoff Simmons
geoff at uplex.de
Tue Aug 24 14:39:49 UTC 2021
Hello,
The spec file for RPM packages:
https://raw.githubusercontent.com/varnishcache/pkg-varnish-cache/master/redhat/varnish.spec
... has this passage:
Provides: varnish-libs%{?_isa} = %{version}-%{release}
Provides: varnish-libs = %{version}-%{release}
Obsoletes: varnish-libs
Provides: varnish-docs = %{version}-%{release}
Obsoletes: varnish-docs
Provides: varnish-debuginfo%{?_isa} = %{version}-%{release}
Provides: varnish-debuginfo = %{version}-%{release}
Obsoletes: varnish-debuginfo
This may be an RPM technique that I'm not familiar with, but why does it
have both Provides and Obsoletes for -libs, -docs and -debuginfo?
Since the Obsoletes don't specify a version, my best guess is that it's
something about updating to newer versions. But wouldn't newer versions
(newer version and RPM release number) be enough for that?
Asking because I'm building a custom RPM package for which I'd also like
to have the debuginfo. Creating the debuginfo RPM is easy enough, by
removing this line from the spec:
%global debug_package %{nil}
But then when you try to run debuginfo-install, it says that the
debuginfo package is obsoleted by the Varnish package.
I can get the debuginfo to install by removing the Obsoletes line for
varnish-debuginfo, and rebuilding the RPMs. But I'm confused about why
it was there in the first place, and concerned that I may have broken
something else by doing so.
Thanks,
Geoff
--
** * * UPLEX - Nils Goroll Systemoptimierung
Scheffelstraße 32
22301 Hamburg
Tel +49 40 2880 5731
Mob +49 176 636 90917
Fax +49 40 42949753
http://uplex.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20210824/ec1cf7da/attachment.bin>
More information about the varnish-dev
mailing list