[Rpm-maint] [rpm-software-management/rpm] RFE: Support rpm version comparison in expressions (#1233)
Miro Hrončok
notifications at github.com
Tue May 19 13:29:39 UTC 2020
@hroncok commented on this pull request.
> @@ -241,15 +241,17 @@ newline is deleted). Note the 2nd % needed to escape the arguments to
Expression expansion can be performed using "%[expression]". An
expression consists of terms that can be combined using
-operators. Rpm supports two kinds of terms, numbers made up
-from digits and strings enclosed in double quotes. Rpm will
-expand macros when evaluating terms.
+operators. Rpm supports three kinds of terms, numbers made up
+from digits, strings enclosed in double quotes (eg "somestring") and
+versions enclosed in double quotes preceded by (eg v"3:1.2-1").
```suggestion
versions enclosed in double quotes preceded by v (eg v"3:1.2-1").
```
>
You can use the standard operators to combine terms: logical
operators &&, ||, !, relational operators !=, ==, <, > , <=, >=,
arithmetic operators +, -, /, *, the ternary operator ? :, and
parentheses. For example, "%[ 3 + 4 * (1 + %two) ]" will expand
-to "15" if "%two" expands to "2".
+to "15" if "%two" expands to "2". Version terms are compared using
+rpm version comparison algorith, rather than regular string comparison.
```suggestion
rpm epoch:version-release comparison algorithm, rather than regular string comparison.
```
--
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/pull/1233#pullrequestreview-414441468
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20200519/c3a0af29/attachment.html>
More information about the Rpm-maint
mailing list