diff --git a/ChangeLog b/ChangeLog index cbc76d2b79..b503628850 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Tue Jun 26 14:40:00 BST 2007 Richard W.M. Jones + + * src/remote_internal.c, python/Makefile.am: Python bindings + fixed, and now building virConnect.getHostname and + virConnect.getURI. Fixed a problem which stopped + libvirt.py from being (re-)built. Rearranged + python/Makefile.am to make it cleaner and clearer. + Tue Jun 26 12:40:00 BST 2007 Richard W.M. Jones * include/libvirt/libvirt.h.in, src/libvirt.c: (and numerous diff --git a/python/Makefile.am b/python/Makefile.am index dbb471d305..4f97610912 100644 --- a/python/Makefile.am +++ b/python/Makefile.am @@ -37,9 +37,22 @@ libvirtmod_la_LIBADD = $(mylibs) # Python header files contain a redundant decl, hence: libvirtmod_la_CFLAGS = -Wno-redundant-decls +GENERATE = generator.py +API_DESC = $(top_srcdir)/docs/libvirt-api.xml $(srcdir)/libvirt-python-api.xml +GENERATED= libvirt-export.c \ + libvirtclass.txt \ + libvirt-py.c \ + libvirt-py.h \ + libvirtclass.py + +$(GENERATED): $(srcdir)/$(GENERATE) $(API_DESC) + $(PYTHON) $(srcdir)/$(GENERATE) $(srcdir) + libvirt.py: $(srcdir)/libvir.py libvirtclass.py cat $(srcdir)/libvir.py libvirtclass.py > libvirt.py +$(libvirtmod_la_OBJECTS): $(GENERATED) + install-data-local: $(mkinstalldirs) $(DESTDIR)$(pythondir) @INSTALL@ -m 0644 libvirt.py $(DESTDIR)$(pythondir) @@ -47,24 +60,7 @@ install-data-local: @(for doc in $(DOCS) ; \ do @INSTALL@ -m 0644 $$doc $(DESTDIR)$(DOCS_DIR) ; done) -GENERATE = generator.py -API_DESC = $(top_srcdir)/docs/libvirt-api.xml $(srcdir)/libvirt-python-api.xml -GENERATED= libvirt.py \ - libvirt-export.c \ - libvirtclass.txt \ - libvirt-py.c \ - libvirt-py.h \ - libvirtclass.py - -CLEANFILES= $(GENERATED) gen_prog libvirt.py - -$(GENERATED): gen_prog - -gen_prog: $(srcdir)/$(GENERATE) $(API_DESC) - $(PYTHON) $(srcdir)/$(GENERATE) $(srcdir) - touch gen_prog - -$(libvirtmod_la_OBJECTS): $(GENERATED) +CLEANFILES= $(GENERATED) libvirt.py else all: diff --git a/src/remote_internal.c b/src/remote_internal.c index 31db7a1a80..6d020de33c 100644 --- a/src/remote_internal.c +++ b/src/remote_internal.c @@ -104,15 +104,6 @@ static void query_free (struct query_fields *fields); static int initialise_gnutls (virConnectPtr conn); static gnutls_session_t negotiate_gnutls_on_connection (virConnectPtr conn, int sock, int no_verify, const char *hostname); -/* Supported transports. */ -enum transport { - trans_tls, - trans_unix, - trans_ssh, - trans_ext, - trans_tcp, -}; - static int remoteOpen (virConnectPtr conn, const char *uri_str, int flags) { @@ -131,7 +122,14 @@ remoteOpen (virConnectPtr conn, const char *uri_str, int flags) return VIR_DRV_OPEN_DECLINED; /* Decline - not a remote URL. */ /* What transport? */ - enum transport transport; + enum { + trans_tls, + trans_unix, + trans_ssh, + trans_ext, + trans_tcp, + } transport; + if (!transport_str || strcasecmp (transport_str, "tls") == 0) transport = trans_tls; else if (strcasecmp (transport_str, "unix") == 0)