[Rpm-maint] [rpm-software-management/rpm] RFE: Handle disttag (#589)
Jeff Johnson
notifications at github.com
Sun Nov 11 04:42:07 UTC 2018
E is always (when present) a digit string followed by a colon. Trying E: first in a greedy PCRE should resolve the ambiguity between N-E:V and N-V:D for all but an all digit V string (which is possible but quite rare in the real world, and easily worked around if encountered.
There are definite advantages IMHO trying to use a simple foo:bar:baz scheme rather than adding all sorts of ornamentation and forbidding characters in intervening fields. YMMV, have at, if the PCRE is read from configuration and used for parsing (as in RPM5), all the separators can (at least in principle) be changed to taste without changing code.
Another possible way to fix the error is to limit DistTag to a known reserved key word set or form and changing the PCRE.
The key issue is having a EVRD parser that never errors: unrolling the stack from EVRD parsing just isn't going to happen, and rpm has too much state to manage to just exit. In most cases the user will just receive a weird error and exit with a message if the ambiguity you point out is ever encountered.
Supplying more fields also avoids the ambiguity.
--
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/589#issuecomment-437643494
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20181110/7d854326/attachment.html>
More information about the Rpm-maint
mailing list