[Libguestfs] GObject bindings

Richard W.M. Jones rjones at redhat.com
Wed Jan 18 13:15:51 UTC 2012


On Tue, Jan 17, 2012 at 03:48:41PM +0000, Matthew Booth wrote:
> This is the first iteration of the GObject bindings. I have 'kicked the tyres'
> on these, meaning I have ensured that a bunch of basic manual tests work as
> expected. I'm in the process of adding more comprehensive tests.
> 
> Here's an example simple javascript program which uses these bindings:
> 
> ===
> const Guestfs = imports.gi.Guestfs;
> 
> print('Starting');
> var g = new Guestfs.Session();
> 
> var o = new Guestfs.AddDriveOpts({format: 'raw', iface: 'virtio'});
> g.add_drive_opts('tests/guests/fedora.img', null);
> g.launch();
> 
> r = g.inspect_os();
> m = g.inspect_get_mountpoints(r[0]);
> print(m['/boot']);
> 
> print('Finished');
> ===
> 
> Run this file as ./run gjs gobject-test.js

Since this is a brand new feature, I have no objection to integrating
this into libguestfs right away (provided it compiles!)

However, if we are going to do this, it would be nicer if the gobject
bindings could be explicitly disabled in configure, ie:

  ./configure --disable-gobject

so that if they cause problems in Fedora/Debian/other distros, the
packager can disable them until they get fixed.  Note that most (all?)
other language bindings can be disabled in this manner.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming blog: http://rwmj.wordpress.com
Fedora now supports 80 OCaml packages (the OPEN alternative to F#)
http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora




More information about the Libguestfs mailing list