[Rpm-maint] Heads up: Weak and rich dependencies in RPM
ffesti at redhat.com
Thu Feb 20 12:12:43 UTC 2014
We are currently working on adding weak and rich dependencies to
upstream RPM. There are basically two parts:
#1 Adding weak dependencies as already used by SuSE and others:
Recommends:, Suggests:, Supplements: and Enhances:. We agreed with
Michael Schröder to not use SuSE's current implementation but to add new
tags for a cleaner interface and an easy update path for already
existing packages. This is planned to be part of the next RPM version.
As old tools will just ignore the new tags this isn't a big
compatibility issue. Support in rpmbuild can probably back ported easily.
#2 Allow Boolean expressions of (Name Flag Version) terms in Requires:,
Conflicts: and the new weak dependencies (rich dependencies). This will
add a new expressive strength to RPM's dependency model and allow fixing
a couple of packaging problems we don't have a solution for
right now and also get rid of some special case solutions like hand
coded language pack support. As we are still figuring out some of the
implementation details and implications this feature may or may not make
it in the next release.
Packages using such Boolean expressions will not work with old versions
of rpm and other related tools and it is still unclear to what extend
this feature can be back ported.
What implication does this have on your distribution?
Although this new features do affect rpm and packages directly and you
may want to reflect that in your packaging policy the main impact is
outside of rpm itself. The weak dependencies are basically ignored by
rpm and need to be handled in your dependency solver, installer,
updater, software management tool - however you call it.
If you are already using weak dependencies you want to make sure to add
support for the new tags before updating to the next major rpm version.
Also expect that most of your patches adding the old support will fail
to apply. In general I expect the transition to be comparably easy. We
will probably even add some compatibility code in upstream RPM to make
your life easier. Talk to us.
Getting the support into createrepo and libsolv is taken care of. This
should cover Fedora and OpenSUSE and may be others.
If you use a different dependency solver you have various options:
You may just ignore the new features for now. The weak dependencies can
just be ignored. But you won't be able to process packages with Boolean
expression in Requires: or Conflicts:.
If your solver is not NP complete you may want to consider changing to a
libsolv based solution or any other NP complete solver that has a chance
of growing support for weak and rich dependencies in the future.
If you already have a NP complete solver - may be already with support
for weak dependencies - and want to stick with it you should consider
adding support for rich dependencies. Right now there is no code to look
at and there are still some implementation details that we need to
figure out. We will keep you updated on the rpm-maint list.
I wrote a document describing more technical details. Find it attached
to this mail.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 27578 bytes
Desc: not available
More information about the Rpm-maint