On Wed, Aug 12, 2015 at 06:58:12PM +0200, Pino Toscano wrote:
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].
Yikes, that's a very poor choice because at some point someone will
create a revision "10.0" and wonder why "10.0" < "2.0".
If they were
using RPM-style revisions it would work. But that's not something we
can solve.
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.
No, what I said doesn't work in the light of the quote from the
SimpleStreams README above.
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