Re: How can i quit the rpm installation gracefully?

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

 



On Sun, 2 May 2004, Baz wrote:

> All,
> 
> If my rpm has to check an environment variable, say, BARRY_DIR, then if
> $BARRY_DIR does not exist, can the rpm quit gracefully without installing
> anything?
>
Not really.  You can die in %pre, and the files in your rpm will not 
be installed and your packages %post will not run, but the rest of the
packages in the transaction will be merrily processed and installed.
Now here is the news from the bleeding edge:

	- There is this patch called autorollback that is now in rpm's
	  cvs (not in any released version) that attepmts to rollback
	  an rpm transaction at the point of failure, if a system is
	  configured to use this behavior.
	- There seems to be code getting put in for pre transaction,
	  post transaction scripts.  The pre-tran scripts run
	  before any package gets run through the package state 
	  machine, and if this feature pays attention to the 
	  return code of the scripts, you could safely short circuit
	  an install with one of these scripts.

Other than those, admittedly on the bleeding edge options, and not really
here today, your best bet if this is for a package that you are installing
on systems you control, is to wrap your upgrades on your system up with
a script that does some pre validation stuff.

cheers...james 
> Should I do this checking in %pre?
> 
> Thanks, and please provide sample code if possible.
> 
> Barry
> 
> 
> 
> _______________________________________________
> Rpm-list mailing list
> Rpm-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/rpm-list
> 


_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux