[Rpm-maint] [rpm-software-management/rpm] RFE: Convenient version comparison macro (#1217)
Panu Matilainen
notifications at github.com
Thu May 14 08:30:22 UTC 2020
We can't really hijack integers because we support simple mathematical operations on them besides just comparison, and might be some other technical restrictions. In any case, string comparisons in specs typically are either == or !=, in which case treating them as versions wouldn't affect the outcome. And looking at Fedora specs, there are numerous examples where people actually use just that (apparently oblivious to it not doing what they expect):
```
%if "%{php_version}" < "5.6"
%if "%(pkg-config --version 2>/dev/null)" < "0.20.0"
%if "%{version}" > "2.12"
%if "%{_qt5_version}" < "5.12.0"
%if "%version" < "0.20"
%if 0%{?rhel} && "%rhel" < "5"
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1217#issuecomment-628480292
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20200514/53f87ae3/attachment-0001.html>
More information about the Rpm-maint
mailing list