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

Re: Problem with %post and upgrade



Thanks! That fixed it- all works now :)

On Mon, Sep 11, 2000 at 09:51:32AM +0200, Michael A. Peters wrote:
> I build mod_php rpm's and am having a problem with %post and %postun
> script.
>

Yup, rpm installs before removing so your scriptlets are not running
in the order that you expect.

Your %preun is undoing what the %post has done. You need to distinguish
a pure remove pathway (i.e. rpm -e ...) from an upgrade pathway by testing
argv[1] (argv[1] contains the number of instances of the package that
will be located on the system after the script is run).

Basically that means you need to do

%preun
   if [ $1 = 0 ]; then
	<your sed here>
   fi

-=-=-=-=-=-=-=-=-=-=-=- Michael A. Peters (510) 623-9726 Ext. 219 Sr. Developer (510) 249-9125 (fax) Abriasoft http://www.abriasoft.com/





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