Re: how to get version of package 'x' when installing package 'y'

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

 



On 11/18/2009 09:52 PM, 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
Isn't there a file or directory like /usr/share/PKGNAME-VERSION you can test against?

Also be aware that the version comparison is a bit tricky in RPM. If you control the package you are testing against you might be fine.

Florian
_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxxxxx
http://lists.rpm.org/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux