You do rsplit() by the '-'. Right part is R.A. you remove arch and get release.
What exactly you want to do? RPM and DNF have proper --queryformat.
-Igor Gnatenko
On Sep 28, 2016 8:52 PM, "Richard W.M. Jones" <rjones@xxxxxxxxxx> wrote:
Is it permitted to have a non-numeric Version field?
The guidelines are at best unclear on this topic:
https://fedoraproject.org/wiki/Packaging:Versioning# Version_Tag
The lz4 package has version "r131":
http://pkgs.fedoraproject.org/cgit/rpms/lz4.git/tree/lz4. spec#n5
Corollary question: If I'm given an NVR string, how can I split it
into name, version and release? I was using the regexp
^(.*?)-(\d.*)-([^-]+)$
but that breaks on the lz4 package.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top
_______________________________________________ devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx