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

Re: conditional code during an Upgrade



rse+rpm-list@engelschall.com ("Ralf S. Engelschall") writes:

> For RPM 4.2.1 (allowing you to query the RPM database while it works
> on it) the following should do what you want:
>
> %preun
>     v_old='%{version}'
>     v_new=`rpm -q --qf '%%{VERSION}' %{name}`

This is not good, since alternative locations (--dbpath) of the rpmdb
will not be honored.



Enrico




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