Enforcing dependencies between RPMs
james at fedoraproject.org
Wed Dec 30 15:23:15 UTC 2009
On Wed, 2009-12-30 at 15:05 +0200, Erez Zilber wrote:
> What is the convention for problems like the following?
> I have 2 projects ('A' & 'B'). 'B' is compiled against symbols from
> 'A'. I have a rpm for 'A' and another rpm for 'B'.
> Now, 'A' & 'B' are installed. I change some symbols in 'A', recreate
> A.rpm and install the new version of 'A'. When I run 'B' (which was
> compiled against the old version of 'A'), it fails because 'A' has
> The question is: how can I enforce that with rpm? What is the
> convention for such cases?
In rough order of "goodness", IMO:
1. Use symbol versions, and let rpmbuild's find_provides/find_requires
do all the work.
2. Use SO name versions (and always change the major version when you
change/remove symbols), and let rpmbuild do most of the work.
3. Use an explicit provide/require for the ABI. Eg.
# Package A
Provides: pkgA-ABI = 1.1
# Package B
Requires: pkgA-ABI >= 1.1
Requires: pkgA-ABI < 2.0
4. Use conflicts in pkgA on versions of pkgB that don't work with this
# Package A
Conflicts: pkgB < 1.6.8
5. Require explicit versions of pkgA from pkgB. This is often bad
because you'll be forced to update pkgB just to update the requires,
when you change pkgA (you can alleviate this somewhat by not requiring a
specific release, just the version).
James Antill - james at fedoraproject.org
More information about the Rpm-list