On Wednesday 12 August 2015 17:08:42 Richard W.M. Jones wrote:
On Wed, Aug 12, 2015 at 03:12:21PM +0200, Pino Toscano wrote:
Add support for non-integer revisions of entries, comparing them as integer when possible.
Have you got an example of revisions?
The Simple Streams README says about that: * version_name: A 'version' of a product represents a release, build or collection of that product. A key in the 'versions' dictionary should be sortable by rules of a 'LANG=C sort()'. That allows the client to trivially order versions to find the most recent. Ubuntu uses "serial" numbers for these keys, in the format YYYYMMDD[.0-9]. json files for Ubuntu and CirrOS images uses this format, although it seems to not be a strict rule.
It may be possible to use Common_utils.compare_version which does RPM revision-style comparison.
Hm so you are suggesting to just make the revision internally as string (but still forcing an integer in native indexes)? That would work too, I guess. Thanks, -- Pino Toscano