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

%preun and %postun does not run



Good day.

I wrote a following simple specfile:

Name: Test
Version: 1.0.0
Revision: 1
License: Dummy
Group: Dummy
Summary: Test
%description 
test

%files

%pre
echo pre

%post
echo post

%preun
echo preun

%postun
echo postun

and another one - exactly same, but with revision 2

Now I do following:

1) rpm -U test-1.0.0-1.i386.rpm
Output:
 pre
 post
(Expected)

2) rpm -e test
Output:
 preun
 postun
(Expected)

3) rpm -U test-1.0.0-1.i386.rpm
Output:
 pre
 post
(Expected)

4) rpm -U --force test-1.0.0-1.i386.rpm
Output:
 pre
 post

pre/post uninstall scripts are not running !
5) rpm -U --force test-1.0.0-2.i386.rpm
Output:
 pre
 post
 preun
 postun 
(Expected)

6) rpm -U --force test-1.0.0-1.i386.rpm
Output:
 pre
 post
 preun
 postun 
(Expected)

I.e, when i try upgrade package to the package with
same version and release pre/post uninstall scripts
are not run (and pre/post install are run).

I don't this behavour documentated.
Is it a normal or it's a bug ?
Is it a way to force rpm to run pre/post uninstall
scripts in these case too ?

It was tested on rpm-4.0.3 (RedHat 7.2) and
rpm-4.2 (RedHat 9)

Valery

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com




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