On 01/18/2012 01:15 PM, Richard W.M. Jones wrote:
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!)
As you say, I'm comfortable adding a new feature which may be replete
with implementation bugs as long as it can be disabled. However, I'd be
more cautious about committing to the API without due consideration. I'm
happy to hold off committing it until we've had more eyeballs on the API.
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.
Agreed,
Matt
--
Matthew Booth, RHCA, RHCSS
Red Hat Engineering, Virtualisation Team
GPG ID: D33C3490
GPG FPR: 3733 612D 2D05 5458 8A8A 1600 3441 EA19 D33C 3490