[Rpm-maint] [rpm-software-management/rpm] error: invalid version: v"3" (but only in a a complex conditional) (Issue #1883)

Miro Hrončok notifications at github.com
Thu Jan 13 15:53:08 UTC 2022


This expression is valid:

```
$ rpm --eval '%[(("3" == "3") && (v"3.10" >= v"3.10"))]'
1
```

So is this:

```
$ rpm --eval '%[(v"3" >= v"3.10")]'
0
```

But putting an `||` between them is not:

```
$ rpm --eval '%[(("3" == "3") && (v"3.10" >= v"3.10")) || (v"3" >= v"3.10")]'
error: invalid version: (("3" == "3") && (v"3.10" >= v"3.10")) || (v"3" >= v"3.10")
error:                                                                ^
```

reversing the order fixes the expression again:

```
$ rpm --eval '%[(v"3" >= v"3.10") || (("3" == "3") && (v"3.10" >= v"3.10"))]'
1
```

This is rpm-4.17.0-1.fc35.x86_64

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1883
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/issues/1883 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20220113/f129e980/attachment-0001.html>


More information about the Rpm-maint mailing list