I tried the same but still the same scripts ( preun and postun ) which are part of older version rpm are being executed after doing this check also.By any chance can we supress this so that this will not be executed at all.
Thanks,
Shekhar.
On 11/14/05, Jos Vos <jos@xxxxxx> wrote:
On Mon, Nov 14, 2005 at 02:57:12PM +0530, shekhar vaggu wrote:
> I observed one behaviour when upgrading the rpm package from older version
> to the newer version what I could see is when upgrade is happening rpm is
> executing the scripts located in postun section also. Is it the expected
> behaviour of rpm? Please give some information on what can/should be done to
> suppress postun section step to happen during upgrade.
Yes, this is correct.
You can check the parameter "$1" (== number of versions of this package
installed after the RPM transaction) that is passed to the script to
execute code conditionally, e.g.
if [ "$1" -eq 0 ]; then
# code to execute at uninstall
...
else
# code to execute at upgrade
...
fi
--
-- Jos Vos < jos@xxxxxx>
-- X/OS Experts in Open Systems BV | Phone: +31 20 6938364
-- Amsterdam, The Netherlands | Fax: +31 20 6948204
_______________________________________________
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