Having to create an RPM package in work that is required to "upgrade" the previous package.
Problem being that the UPGRADE must run the uninstall of the previous package with --noscripts as the option.
rpm -Uvh --noscripts packagename-version.rpm results in only the install scripts of the new package being disabled, not the otherway around.
As far as I can see there is no option with the RPM package manager to do this, however this cannot be a new problem.
Anyone know quite how to solve this?
Manually it would be the following:
rpm -e --noscripts package-1.0
rpm -i package-2.0.rpm
I can't do it manually on the production system however, and it is required to work with the -U option.
Easiest way of doing it in my head would be in the %pre scriptlet of package-2.0 having something that did
rpm -e --noscripts package-1.0
and forcing a -i option on the install of package-2.0 (I can either enforce, -U or -i but can't enforce 2 steps [e.g. -e --noscripts followed by a -i).
However I understand that rpm... can't run rpm inside of itself due to an inability to lock the rpmdb.
I'm smashing my head against the proverbial brick wall here, so any help would be much appreciated.