Re: Non-numeric lz4 package version
On Wed, Sep 28, 2016 at 09:05:13PM +0200, Igor Gnatenko wrote: > You do rsplit() by the '-'. Right part is R.A. you remove arch and get > release. Ah got it, because the release field can't contain a '-'. > What exactly you want to do? RPM and DNF have proper --queryformat. I don't have the RPM around. Need the name in order to query koji for the latest-pkg then download it. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch http://libguestfs.org/virt-builder.1.html ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Re: Non-numeric lz4 package version
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" 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@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Non-numeric lz4 package version
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@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org