[libvirt] [PATCH] python: Better error reporting if 'import libvirtmod' fails

Don't squash a possibly legitimate libvirtmod error (e.g. some from clashing libvirt.so versions) with 'Cannot import cygvirtmod' --- python/libvir.py | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/python/libvir.py b/python/libvir.py index 8a16dd0..3cda8dc 100644 --- a/python/libvir.py +++ b/python/libvir.py @@ -8,8 +8,12 @@ # On cygwin, the DLL is called cygvirtmod.dll try: import libvirtmod -except: - import cygvirtmod as libvirtmod +except ImportError, lib_e: + try: + import cygvirtmod as libvirtmod + except ImportError, cyg_e: + if str(cyg_e).count("No module named"): + raise lib_e import types -- 1.6.2.2

Let the underlying driver tell us what it supports. At the moment we are at least erroneously denying floppy eject/insert. Last time I posted this, it was pointed out that 'type' now needs to be properly escaped for use in the xml: while true, that's a problem in numerous other places in virsh, so I've skipped it with this patch. --- src/virsh.c | 7 ------- 1 files changed, 0 insertions(+), 7 deletions(-) diff --git a/src/virsh.c b/src/virsh.c index ce90d3d..865b6e5 100644 --- a/src/virsh.c +++ b/src/virsh.c @@ -5509,13 +5509,6 @@ cmdAttachDisk(vshControl *ctl, const vshCmd *cmd) type = vshCommandOptString(cmd, "type", NULL); mode = vshCommandOptString(cmd, "mode", NULL); - if (type) { - if (STRNEQ(type, "cdrom") && STRNEQ(type, "disk")) { - vshError(ctl, FALSE, _("No support %s in command 'attach-disk'"), type); - goto cleanup; - } - } - if (driver) { if (STREQ(driver, "file") || STREQ(driver, "tap")) { isFile = 1; -- 1.6.2.2

On Mon, May 18, 2009 at 01:57:48PM -0400, Cole Robinson wrote:
Let the underlying driver tell us what it supports. At the moment we are at least erroneously denying floppy eject/insert.
Last time I posted this, it was pointed out that 'type' now needs to be properly escaped for use in the xml: while true, that's a problem in numerous other places in virsh, so I've skipped it with this patch. --- src/virsh.c | 7 ------- 1 files changed, 0 insertions(+), 7 deletions(-)
diff --git a/src/virsh.c b/src/virsh.c index ce90d3d..865b6e5 100644 --- a/src/virsh.c +++ b/src/virsh.c @@ -5509,13 +5509,6 @@ cmdAttachDisk(vshControl *ctl, const vshCmd *cmd) type = vshCommandOptString(cmd, "type", NULL); mode = vshCommandOptString(cmd, "mode", NULL);
- if (type) { - if (STRNEQ(type, "cdrom") && STRNEQ(type, "disk")) { - vshError(ctl, FALSE, _("No support %s in command 'attach-disk'"), type); - goto cleanup; - } - } - if (driver) { if (STREQ(driver, "file") || STREQ(driver, "tap")) { isFile = 1; --
ACK. Could have sworn we decided to get rid of this months ago. Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

On Mon, May 18, 2009 at 08:04:18PM +0100, Daniel P. Berrange wrote:
On Mon, May 18, 2009 at 01:57:48PM -0400, Cole Robinson wrote:
Let the underlying driver tell us what it supports. At the moment we are at least erroneously denying floppy eject/insert.
Last time I posted this, it was pointed out that 'type' now needs to be properly escaped for use in the xml: while true, that's a problem in numerous other places in virsh, so I've skipped it with this patch.
Okay, fine ! Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/

--- qemud/remote.c | 9 ++++----- src/remote_internal.c | 7 ++----- src/storage_backend.c | 9 +++------ src/storage_backend_fs.c | 29 +++++++++++++---------------- src/storage_backend_logical.c | 9 ++++----- src/test.c | 18 ++++++------------ 6 files changed, 32 insertions(+), 49 deletions(-) diff --git a/qemud/remote.c b/qemud/remote.c index a92dea9..f9aa926 100644 --- a/qemud/remote.c +++ b/qemud/remote.c @@ -52,7 +52,9 @@ #include "datatypes.h" #include "qemud.h" #include "memory.h" +#include "util.h" +#define VIR_FROM_THIS VIR_FROM_REMOTE #define REMOTE_DEBUG(fmt, ...) DEBUG(fmt, __VA_ARGS__) static void remoteDispatchFormatError (remote_error *rerr, @@ -2602,14 +2604,11 @@ static char *addrToString(remote_error *rerr, return NULL; } - if (VIR_ALLOC_N(addr, strlen(host) + 1 + strlen(port) + 1) < 0) { - remoteDispatchOOMError(rerr); + if (virAsprintf(&addr, "%s;%s", host, port) == -1) { + virReportOOMError(NULL); return NULL; } - strcpy(addr, host); - strcat(addr, ";"); - strcat(addr, port); return addr; } diff --git a/src/remote_internal.c b/src/remote_internal.c index 1ca7784..542f4ad 100644 --- a/src/remote_internal.c +++ b/src/remote_internal.c @@ -5189,14 +5189,11 @@ static char *addrToString(struct sockaddr_storage *sa, socklen_t salen) return NULL; } - if (VIR_ALLOC_N(addr, strlen(host) + 1 + strlen(port) + 1) < 0) { - virReportOOMError (NULL); + if (virAsprintf(&addr, "%s;%s", host, port) == -1) { + virReportOOMError(NULL); return NULL; } - strcpy(addr, host); - strcat(addr, ";"); - strcat(addr, port); return addr; } diff --git a/src/storage_backend.c b/src/storage_backend.c index 2db314d..96cf37c 100644 --- a/src/storage_backend.c +++ b/src/storage_backend.c @@ -342,17 +342,14 @@ virStorageBackendStablePath(virConnectPtr conn, if (dent->d_name[0] == '.') continue; - if (VIR_ALLOC_N(stablepath, strlen(pool->def->target.path) + - 1 + strlen(dent->d_name) + 1) < 0) { + if (virAsprintf(&stablepath, "%s/%s", + pool->def->target.path, + dent->d_name) == -1) { virReportOOMError(conn); closedir(dh); return NULL; } - strcpy(stablepath, pool->def->target.path); - strcat(stablepath, "/"); - strcat(stablepath, dent->d_name); - if (virFileLinkPointsTo(stablepath, devpath)) { closedir(dh); return stablepath; diff --git a/src/storage_backend_fs.c b/src/storage_backend_fs.c index fac43df..ff1eac2 100644 --- a/src/storage_backend_fs.c +++ b/src/storage_backend_fs.c @@ -668,14 +668,13 @@ virStorageBackendFileSystemMount(virConnectPtr conn, } if (pool->def->type == VIR_STORAGE_POOL_NETFS) { - if (VIR_ALLOC_N(src, strlen(pool->def->source.host.name) + - 1 + strlen(pool->def->source.dir) + 1) < 0) { + if (virAsprintf(&src, "%s:%s", + pool->def->source.host.name, + pool->def->source.dir) == -1) { virReportOOMError(conn); return -1; } - strcpy(src, pool->def->source.host.name); - strcat(src, ":"); - strcat(src, pool->def->source.dir); + } else { if ((src = strdup(pool->def->source.devices[0].path)) == NULL) { virReportOOMError(conn); @@ -829,13 +828,11 @@ virStorageBackendFileSystemRefresh(virConnectPtr conn, vol->type = VIR_STORAGE_VOL_FILE; vol->target.format = VIR_STORAGE_VOL_FILE_RAW; /* Real value is filled in during probe */ - if (VIR_ALLOC_N(vol->target.path, strlen(pool->def->target.path) + - 1 + strlen(vol->name) + 1) < 0) + if (virAsprintf(&vol->target.path, "%s/%s", + pool->def->target.path, + vol->name) == -1) goto no_memory; - strcpy(vol->target.path, pool->def->target.path); - strcat(vol->target.path, "/"); - strcat(vol->target.path, vol->name); if ((vol->key = strdup(vol->target.path)) == NULL) goto no_memory; @@ -995,15 +992,15 @@ virStorageBackendFileSystemVolCreate(virConnectPtr conn, virStorageVolDefPtr vol) { - if (VIR_ALLOC_N(vol->target.path, strlen(pool->def->target.path) + - 1 + strlen(vol->name) + 1) < 0) { + vol->type = VIR_STORAGE_VOL_FILE; + + if (virAsprintf(&vol->target.path, "%s/%s", + pool->def->target.path, + vol->name) == -1) { virReportOOMError(conn); return -1; } - vol->type = VIR_STORAGE_VOL_FILE; - strcpy(vol->target.path, pool->def->target.path); - strcat(vol->target.path, "/"); - strcat(vol->target.path, vol->name); + vol->key = strdup(vol->target.path); if (vol->key == NULL) { virReportOOMError(conn); diff --git a/src/storage_backend_logical.c b/src/storage_backend_logical.c index cbd2765..1bd00d4 100644 --- a/src/storage_backend_logical.c +++ b/src/storage_backend_logical.c @@ -594,14 +594,13 @@ virStorageBackendLogicalCreateVol(virConnectPtr conn, /* A target path passed to CreateVol has no meaning */ VIR_FREE(vol->target.path); } - if (VIR_ALLOC_N(vol->target.path, strlen(pool->def->target.path) + - 1 + strlen(vol->name) + 1) < 0) { + + if (virAsprintf(&vol->target.path, "%s/%s", + pool->def->target.path, + vol->name) == -1) { virReportOOMError(conn); return -1; } - strcpy(vol->target.path, pool->def->target.path); - strcat(vol->target.path, "/"); - strcat(vol->target.path, vol->name); if (virRun(conn, cmdargv, NULL) < 0) return -1; diff --git a/src/test.c b/src/test.c index f5ec6ec..6cb5425 100644 --- a/src/test.c +++ b/src/test.c @@ -3107,16 +3107,13 @@ testStorageVolumeCreateXML(virStoragePoolPtr pool, goto cleanup; } - if (VIR_ALLOC_N(privvol->target.path, - strlen(privpool->def->target.path) + - 1 + strlen(privvol->name) + 1) < 0) { + if (virAsprintf(&privvol->target.path, "%s/%s", + privpool->def->target.path, + privvol->name) == -1) { virReportOOMError(pool->conn); goto cleanup; } - strcpy(privvol->target.path, privpool->def->target.path); - strcat(privvol->target.path, "/"); - strcat(privvol->target.path, privvol->name); privvol->key = strdup(privvol->target.path); if (privvol->key == NULL) { virReportOOMError(pool->conn); @@ -3201,16 +3198,13 @@ testStorageVolumeCreateXMLFrom(virStoragePoolPtr pool, goto cleanup; } - if (VIR_ALLOC_N(privvol->target.path, - strlen(privpool->def->target.path) + - 1 + strlen(privvol->name) + 1) < 0) { + if (virAsprintf(&privvol->target.path, "%s/%s", + privpool->def->target.path, + privvol->name) == -1) { virReportOOMError(pool->conn); goto cleanup; } - strcpy(privvol->target.path, privpool->def->target.path); - strcat(privvol->target.path, "/"); - strcat(privvol->target.path, privvol->name); privvol->key = strdup(privvol->target.path); if (privvol->key == NULL) { virReportOOMError(pool->conn); -- 1.6.2.2

On Mon, May 18, 2009 at 01:57:49PM -0400, Cole Robinson wrote:
--- qemud/remote.c | 9 ++++----- src/remote_internal.c | 7 ++----- src/storage_backend.c | 9 +++------ src/storage_backend_fs.c | 29 +++++++++++++---------------- src/storage_backend_logical.c | 9 ++++----- src/test.c | 18 ++++++------------ 6 files changed, 32 insertions(+), 49 deletions(-)
ACK, good to get rid of these. Might be fun to add a 'make syntax-check' rule to detect 2 or more lines in sequence using strcat/strcpy. Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

On Mon, May 18, 2009 at 01:57:49PM -0400, Cole Robinson wrote:
--- qemud/remote.c | 9 ++++----- src/remote_internal.c | 7 ++----- src/storage_backend.c | 9 +++------ src/storage_backend_fs.c | 29 +++++++++++++---------------- src/storage_backend_logical.c | 9 ++++----- src/test.c | 18 ++++++------------ 6 files changed, 32 insertions(+), 49 deletions(-)
Yup, good catch ! ACK, Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/

--- docs/formatdomain.html | 20 ++++++++++++++++++++ docs/formatdomain.html.in | 24 ++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 0 deletions(-) diff --git a/docs/formatdomain.html b/docs/formatdomain.html index 17dc0cd..27e42ac 100644 --- a/docs/formatdomain.html +++ b/docs/formatdomain.html @@ -183,6 +183,8 @@ </li><li> <a href="#elementsCharUNIX">UNIX domain socket client/server</a> </li></ul> + </li><li> + <a href="#elementsSound">Sound devices</a> </li></ul> </li></ul> </li><li> @@ -916,6 +918,24 @@ qemu-kvm -net nic,model=? /dev/null <target port="1"/> </serial> ...</pre> + <h4> + <a name="elementsSound" id="elementsSound">Sound devices</a> + </h4> + <p> + A virtual sound card can be attached to the host via the + <code>sound</code> element. <span class="since">Since 0.4.3</span> + </p> + <pre> + ... + <sound model='es1370'/> + ...</pre> + <dl><dt><code>sound</code></dt><dd> + The <code>sound</code> element has one mandatory attribute, + <code>model</code>, which specifies what real sound device is emulated. + Valid values are specific to the underlying hypervisor, though typical + choices are 'es1370', 'sb16', and 'ac97' + (<span class="since">'ac97' only since 0.6.0</span>) + </dd></dl> <h2> <a name="examples" id="examples">Example configs</a> </h2> diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index ee32354..4479a6e 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -886,6 +886,30 @@ qemu-kvm -net nic,model=? /dev/null </serial> ...</pre> + + <h4><a name="elementsSound">Sound devices</a></h4> + + <p> + A virtual sound card can be attached to the host via the + <code>sound</code> element. <span class="since">Since 0.4.3</span> + </p> + + <pre> + ... + <sound model='es1370'/> + ...</pre> + + <dl> + <dt><code>sound</code></dt> + <dd> + The <code>sound</code> element has one mandatory attribute, + <code>model</code>, which specifies what real sound device is emulated. + Valid values are specific to the underlying hypervisor, though typical + choices are 'es1370', 'sb16', and 'ac97' + (<span class="since">'ac97' only since 0.6.0</span>) + </dd> + </dl> + <h2><a name="examples">Example configs</a></h2> <p> -- 1.6.2.2

On Mon, May 18, 2009 at 01:57:50PM -0400, Cole Robinson wrote:
--- docs/formatdomain.html | 20 ++++++++++++++++++++ docs/formatdomain.html.in | 24 ++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 0 deletions(-)
ACK, Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

On Mon, May 18, 2009 at 01:57:50PM -0400, Cole Robinson wrote:
--- docs/formatdomain.html | 20 ++++++++++++++++++++ docs/formatdomain.html.in | 24 ++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 0 deletions(-)
Excellent, thanks ! Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/

The cap_lost and prop_modified callbacks could deadlock if an existing device needed to be refreshed, since dev_create expects the driver to be unlocked. --- src/node_device_hal.c | 51 +++++++++++++++++++++++------------------------- 1 files changed, 24 insertions(+), 27 deletions(-) diff --git a/src/node_device_hal.c b/src/node_device_hal.c index b214f60..e9ea163 100644 --- a/src/node_device_hal.c +++ b/src/node_device_hal.c @@ -462,6 +462,26 @@ cleanup: nodeDeviceUnlock(driverState); } +static void dev_refresh(const char *udi) +{ + const char *name = hal_name(udi); + virNodeDeviceObjPtr dev; + + nodeDeviceLock(driverState); + dev = virNodeDeviceFindByName(&driverState->devs, name); + if (dev) { + /* Simply "rediscover" device -- incrementally handling changes + * to sub-capabilities (like net.80203) is nasty ... so avoid it. + */ + virNodeDeviceObjRemove(&driverState->devs, dev); + } else + DEBUG("no device named %s", name); + nodeDeviceUnlock(driverState); + + if (dev) { + dev_create(udi); + } +} static void device_added(LibHalContext *ctx ATTRIBUTE_UNUSED, const char *udi) @@ -512,20 +532,9 @@ static void device_cap_lost(LibHalContext *ctx ATTRIBUTE_UNUSED, const char *cap) { const char *name = hal_name(udi); - virNodeDeviceObjPtr dev; - - nodeDeviceLock(driverState); - dev = virNodeDeviceFindByName(&driverState->devs,name); DEBUG("%s %s", cap, name); - if (dev) { - /* Simply "rediscover" device -- incrementally handling changes - * to sub-capabilities (like net.80203) is nasty ... so avoid it. - */ - virNodeDeviceObjRemove(&driverState->devs, dev); - dev_create(udi); - } else - DEBUG("no device named %s", name); - nodeDeviceUnlock(driverState); + + dev_refresh(udi); } @@ -536,21 +545,9 @@ static void device_prop_modified(LibHalContext *ctx ATTRIBUTE_UNUSED, dbus_bool_t is_added ATTRIBUTE_UNUSED) { const char *name = hal_name(udi); - virNodeDeviceObjPtr dev; + DEBUG("%s %s", name, key); - nodeDeviceLock(driverState); - dev = virNodeDeviceFindByName(&driverState->devs,name); - DEBUG("%s %s", key, name); - if (dev) { - /* Simply "rediscover" device -- incrementally handling changes - * to properties (which are mapped into caps in very capability- - * specific ways) is nasty ... so avoid it. - */ - virNodeDeviceObjRemove(&driverState->devs, dev); - dev_create(udi); - } else - DEBUG("no device named %s", name); - nodeDeviceUnlock(driverState); + dev_refresh(udi); } -- 1.6.2.2

On Mon, May 18, 2009 at 01:57:51PM -0400, Cole Robinson wrote:
The cap_lost and prop_modified callbacks could deadlock if an existing device needed to be refreshed, since dev_create expects the driver to be unlocked.
ACK, tricky one ! The functions triggered from event loop callbacks are ones not currently checkable from the CIL locking test case I wrote. Need to figure out how to check those. Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

On Mon, May 18, 2009 at 01:57:51PM -0400, Cole Robinson wrote:
The cap_lost and prop_modified callbacks could deadlock if an existing device needed to be refreshed, since dev_create expects the driver to be unlocked.
Looks fine, ACK, thanks ! Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/

We were correctly registering a callback , but weren't telling hal to actually notify us of any property changes. --- src/node_device_hal.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/node_device_hal.c b/src/node_device_hal.c index e9ea163..b0955e8 100644 --- a/src/node_device_hal.c +++ b/src/node_device_hal.c @@ -725,7 +725,8 @@ static int halDeviceMonitorStartup(void) !libhal_ctx_set_device_removed(hal_ctx, device_removed) || !libhal_ctx_set_device_new_capability(hal_ctx, device_cap_added) || !libhal_ctx_set_device_lost_capability(hal_ctx, device_cap_lost) || - !libhal_ctx_set_device_property_modified(hal_ctx, device_prop_modified)) { + !libhal_ctx_set_device_property_modified(hal_ctx, device_prop_modified) || + !libhal_device_property_watch_all(hal_ctx, &err)) { fprintf(stderr, "%s: setting up HAL callbacks failed\n", __FUNCTION__); goto failure; } -- 1.6.2.2

On Mon, May 18, 2009 at 01:57:52PM -0400, Cole Robinson wrote:
We were correctly registering a callback , but weren't telling hal to actually notify us of any property changes.
ACK, this will likely explain some other issues I was seeing with the node devices not refreshing when I expected wrt to PCI device detach/attach! Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

Generating at install time breaks 'make && sudo make install' if root can't access the users home directory (NFS w/ norootsquash for example). --- qemud/Makefile.am | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/qemud/Makefile.am b/qemud/Makefile.am index 924e8ad..9b8e6ba 100644 --- a/qemud/Makefile.am +++ b/qemud/Makefile.am @@ -31,6 +31,8 @@ EXTRA_DIST = \ $(AVAHI_SOURCES) \ $(DAEMON_SOURCES) +BUILT_SOURCES = libvirtd.init libvirtd.logrotate + if HAVE_RPCGEN # # Maintainer-only target for re-generating the derived .c/.h source @@ -212,7 +214,6 @@ remote_dispatch_args.h: $(srcdir)/remote_generate_stubs.pl remote_protocol.x remote_dispatch_ret.h: $(srcdir)/remote_generate_stubs.pl remote_protocol.x perl -w $(srcdir)/remote_generate_stubs.pl -r $(srcdir)/remote_protocol.x > $@ -DISTCLEANFILES += libvirtd.logrotate libvirtd.logrotate: libvirtd.logrotate.in sed \ -e s!\@localstatedir\@!@localstatedir@!g \ @@ -256,6 +257,7 @@ else install-init: uninstall-init: +libvirtd.init: endif # DBUS_INIT_SCRIPTS_RED_HAT @@ -265,5 +267,5 @@ libvirtd_LDADD += ../gnulib/lib/libgnu.la $(LIBSOCKET) endif # WITH_LIBVIRTD -CLEANFILES = libvirtd.init +CLEANFILES = $(BUILT_SOURCES) CLEANFILES += *.cov *.gcov .libs/*.gcda .libs/*.gcno *.gcno *.gcda -- 1.6.2.2

On Mon, May 18, 2009 at 01:57:53PM -0400, Cole Robinson wrote:
Generating at install time breaks 'make && sudo make install' if root can't access the users home directory (NFS w/ norootsquash for example). ---
ACK, makes sense. Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

On Mon, May 18, 2009 at 01:57:53PM -0400, Cole Robinson wrote:
Generating at install time breaks 'make && sudo make install' if root can't access the users home directory (NFS w/ norootsquash for example).
ACK, Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/

--- Makefile.am | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/Makefile.am b/Makefile.am index 7a3438e..681034a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -19,7 +19,8 @@ EXTRA_DIST = \ .x-sc_require_config_h \ .x-sc_prohibit_nonreentrant \ Makefile.nonreentrant \ - autogen.sh + autogen.sh \ + mylibtool man_MANS = virsh.1 -- 1.6.2.2

On Mon, May 18, 2009 at 01:57:54PM -0400, Cole Robinson wrote:
--- Makefile.am | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/Makefile.am b/Makefile.am index 7a3438e..681034a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -19,7 +19,8 @@ EXTRA_DIST = \ .x-sc_require_config_h \ .x-sc_prohibit_nonreentrant \ Makefile.nonreentrant \ - autogen.sh + autogen.sh \ + mylibtool
man_MANS = virsh.1
--
ACk Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

On Mon, May 18, 2009 at 01:57:54PM -0400, Cole Robinson wrote:
--- Makefile.am | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/Makefile.am b/Makefile.am index 7a3438e..681034a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -19,7 +19,8 @@ EXTRA_DIST = \ .x-sc_require_config_h \ .x-sc_prohibit_nonreentrant \ Makefile.nonreentrant \ - autogen.sh + autogen.sh \ + mylibtool
man_MANS = virsh.1
Okay I didn't realized where mylibtool was coming from, yup ACK ! Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/

On Mon, May 18, 2009 at 01:57:47PM -0400, Cole Robinson wrote:
Don't squash a possibly legitimate libvirtmod error (e.g. some from clashing libvirt.so versions) with 'Cannot import cygvirtmod' --- python/libvir.py | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/python/libvir.py b/python/libvir.py index 8a16dd0..3cda8dc 100644 --- a/python/libvir.py +++ b/python/libvir.py @@ -8,8 +8,12 @@ # On cygwin, the DLL is called cygvirtmod.dll try: import libvirtmod -except: - import cygvirtmod as libvirtmod +except ImportError, lib_e: + try: + import cygvirtmod as libvirtmod + except ImportError, cyg_e: + if str(cyg_e).count("No module named"): + raise lib_e
import types
ACK Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

On Mon, May 18, 2009 at 01:57:47PM -0400, Cole Robinson wrote:
Don't squash a possibly legitimate libvirtmod error (e.g. some from clashing libvirt.so versions) with 'Cannot import cygvirtmod'
Ah, right ! ACK ! Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/

Daniel Veillard wrote:
On Mon, May 18, 2009 at 01:57:47PM -0400, Cole Robinson wrote:
Don't squash a possibly legitimate libvirtmod error (e.g. some from clashing libvirt.so versions) with 'Cannot import cygvirtmod'
Ah, right ! ACK !
Daniel
Thanks, I've pushed this along with the rest of the little patches I sent. - Cole
participants (3)
-
Cole Robinson
-
Daniel P. Berrange
-
Daniel Veillard