[Libguestfs] [PATCH 1/2] builder: add non-int revisions

Pino Toscano ptoscano at redhat.com
Wed Aug 12 16:58:12 UTC 2015


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20150812/1d78a2ca/attachment.sig>


More information about the Libguestfs mailing list