RPM Community Forums

Mailing List Message of <rpm-devel>

Re: %post-script prerequisites

From: Jeff Johnson <n3npq@mac.com>
Date: Wed 24 Sep 2008 - 19:22:19 CEST
Message-id: <3A93EE2D-1479-4EDE-83B7-D1FE3A6169BB@mac.com>

On Sep 24, 2008, at 12:55 PM, Jeff Johnson wrote:

>>
>> So, there's a general problem: if you both package a program and run
>> it in the %post-script (in the very same package), then bare Requires
>> are not enough: some of them (namely, which are used by the program)
>> should also become Requires(post).
>

Perhaps I should add details in case something else is wrong.

There are 3 contexts that are used when ordering:
    installing
    erasing
and the default case "installed".

If you dig through the bit fields, adding context markers like
"(post)" narrow the context of the dependencies so that
	installing <=> erasing
contexts do not overlap.

The dependencies in the "installed" case, i.e. plain old
     Requires:
with no context marker, are part of the dependencies
used for both installation and erasure ordering.

So adding
     Requires(post):
narrowing the scope, cannot possibly solve the problem
as you have stated. With or without the "(post)" context
marker, install ordering will use the dependency for ordering.

All that adding "(post)" does is exclude the dependency from
being used for erasure ordering. But that's a whole different
issue.

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