Possible to check version of package in %pre/%prerun -> -> changes outcome of install ?

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



I am trying to build an RPM that when installed/upgraded checks the present version of the package and depending on if the present version is a certain version or higher -> do something if lower -> do something else.

i.e if present version is 1.0 or higher -> do something


if present present version is < 1.0 -> do something else.

I have been told that I shouldn't use rpm command (i.e 'rpm-qa')  in the inside the %pre or %prerun  scriptlet as this can cause an RPM - how can I query the existing version in the rpmbuild/spec file?

Any pointers would be great.

Rpm-list mailing 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