I'm experiencing the following issue when performing an upgrade of my software using RPM.
When upgrading an obsolete package using rpm -U (I used the keyword "obsoletes" in the RPM spec) the following happens:
1. %pre is called on the new package
2. %post is called on the new package
3. %preun is called on the old (obsolete) package with $1 == 0 <--- NOT CORRECT
4. %postun is called on the old package
The issue occurs on the following configuration:
Linux version 188.8.131.52-Kernel-TNX-1.0.stable.48 (geeko@buildhost) (gcc version 4.1.2 20061115 (prerelease) (SUSE Linux)) #39 SMP PREEMPT Tu
e Sep 23 09:15:55 CEST 2008
Distribution: OpenSuse? 11
On the following configuration, the %preun is not called at all, and the obsolete pacakage appears to be still installed after the upgrade.
Linux version 184.108.40.206linux-220.127.116.11-pentium-m-1.0.stable.45-pentium4 (wijnand@wst102) (gcc version 4.1.2 20061115 (prerelease) (SUSE Lin
ux)) #3 SMP PREEMPT Wed Jul 2 16:42:03 CEST 2008
Distribution: OpenSuse? 10.1
In both configurations rpm --version gives "RPM version 4.4.2"