On Wed, Nov 18, 2009 at 4:06 PM, Jos Vos <jos@xxxxxx> wrote:
Thanks!
That was exactly what I was looking for.
My trouble was that the feature wasn't described in 'Maximum RPM' and so
I didn't know it existed and, fortunately, the version of RPM on my target has
this feature.
On Wed, Nov 18, 2009 at 03:52:59PM -0500, Fulko Hew wrote:Use %trigger scripts. In your mypackage spec file, add:
> 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
%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.
Thanks!
That was exactly what I was looking for.
My trouble was that the feature wasn't described in 'Maximum RPM' and so
I didn't know it existed and, fortunately, the version of RPM on my target has
this feature.
_______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxxxxx http://lists.rpm.org/mailman/listinfo/rpm-list