On Wed, Nov 18, 2009 at 03:52:59PM -0500, Fulko Hew wrote: > Here's my dilemma (maybe I'm taking the wrong approach)... > > In the spec file for 'mypackage', I want to have a shell script as part of > the %post > that does something based on the version of _another_ of my (already > installed) packages > > in pseudo code: > > %post > > VER=`rpm -q other_package --queryformat'%{VERSION}' > if VER > 1.2 then > do something > else > do something different > fi Use %trigger scripts. In your mypackage spec file, add: %triggerin -- other_package > 1.2 do something %triggerin -- other_package <= 1.2 do something different This will execute the scripts every time other_package is installed/updated and also when your package is installed/upgraded and other_package was already installed. -- -- Jos Vos <jos@xxxxxx> -- X/OS Experts in Open Systems BV | Phone: +31 20 6938364 -- Amsterdam, The Netherlands | Fax: +31 20 6948204 _______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxxxxx http://lists.rpm.org/mailman/listinfo/rpm-list