Thanks for asking :).
Here is what I want to accomplish:
- Consider a system, with the state of its package database and
installed packages at some state S0.
- Now, there is a sequence of available upgrades U1 and U2 already
published for this system, that take it to
states S1 and S2 respectively.
- Each upgrade is a set of one or more RPMs.
- Each upgrade can perform only one state transition - i.e. the shortest one.
e.g. U1 takes the system from S0 to S1
U2 from S1 to S2, and so on.
- Now, can the package creator construct an upgrade U3, such that it
can upgrade a system from state S0 to a state S3, by forcing
transitions from S0 through S2 using package-level dependencies? (Just
so that Yum can sequence the updates, rather than the package creator
having to write her upgrade packages to explicitly check for
As part of this, some scenarios would be:
- If a package requires a previous version of the same package as a
prerequisite, can this be expressed in the RPM spec? (Does this work?
I am guessing it does.)
- Now some packages from U3 could only depend on side-effects of
packages in U1/U2. As long as erasing those packages does not undo
those side-effects, I would want to preserve the side-effects, but
erase the packages.
I figured one way to achieve this would be obsolescence. So, can a
package 'a.rpm' require 'b.rpm', but also obsolete it? Is the
'requires' relation only a pre-installation check (i.e. it doesn't
matter if b is removed later during the transaction), or does it imply
a & b *must* co-exist? What would be the sequence of actions in this
And of course, is there a different, better way to achieve the same result?
On Mon, Jun 1, 2009 at 12:53 PM, Jeff Johnson <firstname.lastname@example.org> wrote:
> On Jun 1, 2009, at 3:28 PM, Anshuman Kanetkar wrote:
>> Can the 'Obsoletes' and 'Requires' relations be combined together,
>> directed towards the same target from an RPM?
>> a.rpm -- Obsoletes --> b.rpm
>> a.rpm -- Requires --> b.rpm
>> What I want to express is that package 'a' needs 'b' as a prerequisite
>> ('a' cannot be installed unless 'b' is installed first), but the
>> installation of 'a' should then obsolete 'b'.
>> Does RPM allow such semantics?
> Requires: is an assertion statement and ordering hint, Obsoletes: is a
> of package erasing, which are quite different things.
> And so the combination is "allowed".
> But its unlikely that specifying a Requires: and Obsoletes: does what you
> Let's back up a bit ...
> What are you trying to accomplish in packaging?
> At a general level, not with specific questions about what Requires: and
> can or will do.
> There's likely a solution even if not specifically what you are asking re
> Requires: and Obsoletes:.
> 73 de Jeff
> RPM Package Manager http://rpm5.org
> User Communication List email@example.com
Received on Mon Jun 1 23:39:49 2009