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

Re: Different dependencies: Skip package with unsatisfied requirements



On Fri, Jan 24, 2003 at 01:36:30PM +0100, Toralf Lund wrote:
> I guess what I really want [ refer to my other post ] is a somewhat 
> different behaviour for some package dependencies. Basically, in some 
> cases I want something like
> 
> Requires: B
> 
> for some package "A", but if "B" isn't installed and I do
> 
> rpm -U A-...rpm C-...rpm D...rpm
> 
> I want rpm to go ahead and install packages "C" and "D", rather than 
> stopping the entire operation (i.e. merely remove "A" from the install 
> list.)
> 
> This behaviour could be partially simulated using
> 
> %pre
> 
> if ! rpm -q B
> then
>    exit 1
> fi
> 
> if only 'rpm -q' would work in a pre-install script.
> 

Yup, this is what I call "package bundles", basically a package with
	%post
	if [ "`rpm -q B`" != "package B is not installed" ]; then
	    rpm -Uvh A B
	fi
	rpm -Uvh C D

This, too, is doable with concurrent access, but requires O_RDWR,
not O_RDONLY, access. I know that I'm going to be able to do O_RDONLY,
O_RDWR has the potential of self deadlocks, and so is trickier.

Should work with rpm-4.1 and later, haven't (yet) tried.

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] []