On Mon, Oct 7, 2013 at 12:13 PM, Daniel P. Berrange <berrange@xxxxxxxxxx> wrote: > On Fri, Oct 04, 2013 at 01:02:39AM +0300, Zeeshan Ali (Khattak) wrote: >> From: "Zeeshan Ali (Khattak)" <zeeshanak@xxxxxxxxx> >> >> Applications can use this to determine if an OS is just a snapshot and >> not an actual released product yet. For example, gnome-continuous images >> for development snapshots of GNOME and pre-release and nightly build ISOs >> of Fedora etc. >> --- >> data/schemas/libosinfo.rng | 5 +++++ >> osinfo/libosinfo.syms | 1 + >> osinfo/osinfo_loader.c | 1 + >> osinfo/osinfo_os.c | 18 ++++++++++++++++++ >> osinfo/osinfo_os.h | 6 ++++-- >> 5 files changed, 29 insertions(+), 2 deletions(-) >> >> diff --git a/data/schemas/libosinfo.rng b/data/schemas/libosinfo.rng >> index 735ced0..1e572e2 100644 >> --- a/data/schemas/libosinfo.rng >> +++ b/data/schemas/libosinfo.rng >> @@ -481,6 +481,11 @@ >> <optional> >> <ref name='devices-rel'/> >> </optional> >> + <optional> >> + <element name='is-snapshot'> >> + <ref name='bool'/> >> + </element> > > Urgh, this 'bool' data type is insanity as a way to model > bools in XML. > > Rather than > > <is-snapshot>true</is-snapshot> > > it should be just > > <is-snapshot/> > > The non-existance of the element represents 'false'. > > Sadly we can't kill it off from existing schema usage, but > we could deprecate it and make things look for the existance > of the element + back compat code for old docs. Sounds good and I actually spent some time changing the loader code but ended up into weird issues. I don't think this is super important right now and IMO this syntax is not so ugly. OTOH I really want to get these changes in ASAP (especially gnome-continuous 3.12 one as many gnome devs/designers want to use that in Boxes). >> diff --git a/osinfo/libosinfo.syms b/osinfo/libosinfo.syms >> index ccd7c30..0537c58 100644 >> --- a/osinfo/libosinfo.syms >> +++ b/osinfo/libosinfo.syms >> @@ -117,6 +117,7 @@ LIBOSINFO_0.0.1 { >> osinfo_os_add_device; >> osinfo_os_get_family; >> osinfo_os_get_distro; >> + osinfo_os_get_is_snapshot; >> osinfo_os_get_media_list; >> osinfo_os_add_media; >> osinfo_os_get_tree_list; > > This should be added under a new version block. You should never add to > existing blocks once released. Ouch, bad habits from other projects. :) -- Regards, Zeeshan Ali (Khattak) FSF member#5124 _______________________________________________ Libosinfo mailing list Libosinfo@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libosinfo