On Jun 30, 2008, at 9:17 PM, Jay Soffian wrote:
> Jeff,
>
> Is /bin/rpm's topological sorting stable?
>
As in "stable sorting"? No, topological sort is "partial ordering":,
which *by definition* is not "stable", i.e. "deterministic", resulting
in identical ordering for all possible inputs.
> That is, given three RPMs on the command line:
>
> # /bin/rpm -U rpm1.rpm rpm2.rpm rpm3.rpm
>
> are the RPMs guaranteed to be installed in that order, absent any
> inter-dependencies?
>
Yes, guaranteed if the are no relations between *[123].rpm.
At worst, the *.rpm will be reordered according to the heuristic
of the count of incoming edges. Note that all explicit relations will
be honored. But that isn't what you specified with "absent ... inter-
dependencies".
> If not, I assume my options to guarantee install order are:
>
> 1. Use PreReqs -- except I can't because I'm not in control of the
> RPMs.
You are doomed using PreReq: for ordering (imho), which is why
RPMSENSE_PREREQ
was removed in rpm-5.x.
YMMV . Have fun!
> 2. Use --noorder
RPM will install in the order mentioned on the command line if
--noorder is specified.
Have fun!
> 3. /bin/rpm -U rpm1.rpm && /bin/rpm -U rpm2.rpm && /bin/rpm -U
> rpm3.rpm
>
Dunno. If no interdependecies, that is exactly equivalent to
/bin/rpm -U rpm1.rpm rpm2.rpm rpm3.rpm
or
/bin/rpm -U --noorder rpm1.rpm rpm2.rpm rpm3.rpm
(the only difference is that rpm uses the number of incoming edges as
a heuristic
to order nodes when there are no other constraints, as in "absent ...
interdependencies".
> Is that about it?
>
All depends on on what version of rpm. Presumably this is not
rpm-5.x ...
73 de Jeff
Received on Tue Jul 1 03:38:59 2008