Re: [Rpm-maint] [rpm-software-management/rpm] RFC: support rpm version comparison in expression parser (#1220)

2020-05-19 Thread Panu Matilainen
Thanks for the feeback folks, submitted a proper version as #1233 now. -- 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/1220#issuecomment-630813215___

Re: [Rpm-maint] [rpm-software-management/rpm] RFC: support rpm version comparison in expression parser (#1220)

2020-05-19 Thread Panu Matilainen
Closed #1220. -- 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/1220#event-3351694149___ Rpm-maint mailing list Rpm-maint@lists.rpm

Re: [Rpm-maint] [rpm-software-management/rpm] RFC: support rpm version comparison in expression parser (#1220)

2020-05-15 Thread Panu Matilainen
Intended to rebase this on top of #1221 to be able to use full version comparison and use v".." syntax, but seems I emptied my bucket for to day. If somebody's bored and wants to have a go, feel free. If not, I'll get back into it next week. -- You are receiving this because you are subscribed

Re: [Rpm-maint] [rpm-software-management/rpm] RFC: support rpm version comparison in expression parser (#1220)

2020-05-15 Thread Panu Matilainen
(hmm, maybe we need a separate PoC label, or maybe we should just rename RFC to PoC...) -- 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/1220#issuecomment-629146708_

Re: [Rpm-maint] [rpm-software-management/rpm] RFC: support rpm version comparison in expression parser (#1220)

2020-05-15 Thread Panu Matilainen
Folks, please keep the discussion in the ticket, this is just a PoC not intended for merging and will go away soonish. -- 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/1220#

Re: [Rpm-maint] [rpm-software-management/rpm] RFC: support rpm version comparison in expression parser (#1220)

2020-05-15 Thread Miro Hrončok
`%{version:1.2.3}` would be my choice as well, if only it would not be confusing with `%{version}`. That' why I proposed `%{ver:5.6}` -- 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

Re: [Rpm-maint] [rpm-software-management/rpm] RFC: support rpm version comparison in expression parser (#1220)

2020-05-15 Thread Vít Ondruch
In Ruby, there is quite commonly used something like `%q{foo}`, `%r{foo}` to denote quoted string and regexp respectively. Therefore my suggestion would be to use `%v{1.2.3}` if we really need some special syntax. But also `%{version:1.2.3}` wold be good enough. And maybe much better. -- You a

Re: [Rpm-maint] [rpm-software-management/rpm] RFC: support rpm version comparison in expression parser (#1220)

2020-05-14 Thread Michael Schroeder
Yeah, I should read the comments instead of just looking at the "Files Changed" tab... -- 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/1220#issuecomment-628682647__

Re: [Rpm-maint] [rpm-software-management/rpm] RFC: support rpm version comparison in expression parser (#1220)

2020-05-14 Thread Panu Matilainen
I'll try to submit a more complete version tomorrowish, there's some bulldozing in order... -- 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/1220#issuecomment-628681865_

Re: [Rpm-maint] [rpm-software-management/rpm] RFC: support rpm version comparison in expression parser (#1220)

2020-05-14 Thread Panu Matilainen
@mlschroe , as noted in the description and commit messages: "this isn't right as it uses rpmvercmp() whereas this would need to compare entire EVR labels, but suffices for PoC purposes." -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view i

Re: [Rpm-maint] [rpm-software-management/rpm] RFC: support rpm version comparison in expression parser (#1220)

2020-05-14 Thread Miro Hrončok
Listed in https://github.com/rpm-software-management/rpm/issues/1217#issuecomment-628526414 -- 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/1220#issuecomment-628650303_

Re: [Rpm-maint] [rpm-software-management/rpm] RFC: support rpm version comparison in expression parser (#1220)

2020-05-14 Thread Michael Schroeder
How about supporting EVR syntax instead of that rpmvercmp() call? -- 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/1220#issuecomment-628650459

Re: [Rpm-maint] [rpm-software-management/rpm] RFC: support rpm version comparison in expression parser (#1220)

2020-05-14 Thread Michael Schroeder
Another possibility would be the pythonish/perlish `v"1.2.3"`. -- 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/1220#issuecomment-628647876___

Re: [Rpm-maint] [rpm-software-management/rpm] RFC: support rpm version comparison in expression parser (#1220)

2020-05-14 Thread Miro Hrončok
Thank you! -- 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/1220#issuecomment-628557926___ Rpm-maint mailing list Rpm-maint@lists.

[Rpm-maint] [rpm-software-management/rpm] RFC: support rpm version comparison in expression parser (#1220)

2020-05-14 Thread Panu Matilainen
Inspired by #1217, this is a proof-of-concept patch series to add support for version comparison in the expression parser, allowing things like this to do the right thing: ``` %if `%{python_version}` < `3.9` ... %endif ``` ...and also macros, eg ``` $ ./rpm --eval '%["5.3.0" == "5.3.0+"]' 0 $ .