RPM Community Forums

Mailing List Message of <rpm-devel>

Re: %post-script prerequisites

From: Jeff Johnson <n3npq@mac.com>
Date: Wed 24 Sep 2008 - 21:46:28 CEST
Message-id: <40702D8D-4035-47B7-9A45-A0EED07D840D@mac.com>

On Sep 24, 2008, at 3:27 PM, Alexey Tourbin wrote:

> On Wed, Sep 24, 2008 at 07:08:54PM +0000, Alexey Tourbin wrote:
>> In package foo, program /usr/bin/foo is both packaged *and* called
>> in its %post script.  The program /usr/bin/foo runs /usr/bin/bar,
>> for which we have the dependency "Requires: /usr/bin/bar".
>
> Here is similar example that does not require --noorder option
> to demonstrate the problem.  The difference is that packages A
> and B have circular dependencies, so, unless we have "Requires(post)",
> rpm choose to install A first, and its %post script fails.
>

OK, now we're getting closer to a different issue than "(post)"  
context, breaking loops.

FWIW, rpm ignores _ALL_ dependencies in a loop while ordering
solely because of a principle of equal surprise. If only one, not all,
dependencies in a loop where to be ignored then a quite difficult
to reproduce Heisenbug ordering *.rpm packages is very likely.

But ignoring any single dependency is sufficient to break the loop.

Better heuristics, such as choosing to ignore the edge coming
into the package with the largest number of incoming edges starts to
capture "importance" as a criteria for where the loop should be broken.

And an "importance" criteria may have sufficiently deterministic  
behavior
that a random Heisenbug can be avoided.

I'll look more closely to see why the "(post)" conflict bit has any  
affect
whatsoever on dependency loop removal. That's likely an rpm bug, I  
claim that
all dependencies in the loop should be ignored for the reasons given  
above.

73 de Jeff
Received on Wed Sep 24 21:47:32 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.