Re: Dependency problem when "post" runs command from the rpm

Valery Reznic <[email protected]> Thu, 11 Sep 2008 03:01:49 -0700 (PDT)
Newsgroups gmane.linux.redhat.rpm.general
Message-ID <[email protected]>


--- On Thu, 9/11/08, Toralf Lund <[email protected]> wrote:

> From: Toralf Lund <[email protected]>
> Subject: Dependency problem when "post" runs command from the rpm
> To: "RPM Mailing List" <[email protected]>
> Date: Thursday, September 11, 2008, 12:15 PM
> I've run into an installation order issue related to the
> "post" 
> scriptlet in one of my packages. Basically, this scripts
> executes a 
> (command-line only) program installed by the package, and
> this program 
> pretty much needs everything required by the package. The
> problem is, if 
> I install my package along with some of the required
> software, the 
> requirements are often installed *after* the
> "main" package - which 
> means the "post" script won't work because
> some of what the program 
> needs isn't installed yet.
> 
> So, this is when I use "Requires(post)",
> isn't it? But how do I set it 
to keep Requires and Requires(post) in sync
you 

> up? The Requires of the package is a very long list, and
> most of the 
> entries are added via the "AutoReqProv"
> mechanism, so duplicating the 
> info by hand for "Requires(post)" is rather hard.
> Is there an 
> alternative? Can I somehow say that everything in the main
> Requires list 
> is also required by "post"? Or alternatively, can
> I enable automatic 
> search for shared objects etc. for Requires(post) just like
> for Requires?
To keep Requires and Requires(post) in sync you can use rpmrebuild
(http://rpmrebuild.sf.net)
First you build your package as usual.
Then you use rpmrebuild to rebuild package. You'll need to write plugin for --change-spec-requires.
It's can be something like

sed -n -e 'p' -e 's/^Requires:/Requires(post):/p'

Valery

> 
> - Toralf
> 
> 
> 
> 
> 
> 
> _______________________________________________
> Rpm-list mailing list
> [email protected]
> https://www.redhat.com/mailman/listinfo/rpm-list