[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Checking if other packages are installed in pre/post



On Fri, Jan 24, 2003 at 01:23:28PM +0100, Toralf Lund wrote:
> Is there a way I can check whether or not other are installed from within 
> %pre or %post?
> 
> 'rpm -q' will fail will:
> 
> error: cannot get shared lock on /var/lib/rpm/Packages

Not quite yet. rpm-4.1 and later permit concurrent access, what remains
is to add a tracking dependency to packages that need concurrent access
to function correctly.

If you're brave and/or foolhardy, add
	Requires: rpm >= 4.1
to your package and try doing "rpm -q" in %post.

(aside) Adding
	Requires: rpm >= 4.1
almost works, fails when rpm is being upgraded as part of the same
transaction, or with non-standard configs. What's needed is a tracking
dependency that is satisfied by the rpmlib used to do the install that
is sensitive to whether concurrent access is currently configured.

Almost there.

73 de Jeff

-- 
Jeff Johnson	ARS N3NPQ
jbj@redhat.com (jbj@jbj.org)
Chapel Hill, NC





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []