RPM pre/post/pre-un/post-un and behavior of $1

Amol P apuranik.2010 at gmail.com
Mon Aug 16 08:28:09 UTC 2010


Hi all,

Please have a look of RPM installation output when carried out for two diff
version one after the another. The *Installed version* is obtained by "rpm
-qa | grep mypkg" to check the version which got installed after any rpm
-i/-U comand.

------------------------------------------------------------------------------------------
#1 rpm -Uvh mypkg-2010.05.1.18.noarch.rpm
-PRE-IN:$1=1
-POST-IN:1=1
-Installed Version: mypkg-2010.05.1.18.noarch
------------------------------------------------------------------------------------------
#2 rpm -Uvh mypkg-2010.05.2.2.noarch.rpm
- PRE-IN:$1=2
- POST-IN:$1=2
- PRE-UN:$1=1
- POST-UN:$1=1
- Installed Version: mypkg-2010.05.2.2.noarch
------------------------------------------------------------------------------------------
#3 rpm -Uvh mypkg-2010.05.2.2.noarch.rpm --force
- PRE-IN:$1=2
- POST-IN:$1=2
- Installed Version: mypkg-2010.05.2.2.noarch
------------------------------------------------------------------------------------------
#4 rpm -ivh mypkg-2010.05.1.18.noarch.rpm --force
- PRE-IN:$1=2
- POST-IN:$1=2
- *Installed Version: mypkg-2010.05.1.18.noarch, mypkg-2010.05.2.2.noarch*
------------------------------------------------------------------------------------------
#5 rpm -ivh mypkg-2010.05.2.2.noarch.rpm --force
*- PRE-IN:$1=3  *
*- POST-IN:$1=3  *
- Installed Version: mypkg-2010.05.1.18.noarch, mypkg-2010.05.2.2.noarch
------------------------------------------------------------------------------------------

In observation #4, why both versions are in RPM database. Any other way by
which we can remove the higher version package when we are trying to
install/update the lower version package

In observation #5, a new player comes in $1=3. Is it new feature or
some strange.

Also, how to remove the newer package & its installed stuff, when I am
trying to install/update a LOWER version package *forcefully.* Is it
possible or some tweaking required?
*
*
regards,
ap
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-list/attachments/20100816/cabef30f/attachment.html>


More information about the Rpm-list mailing list