Re: [system-tools] reload xml element from the backend

Carlos Garnacho <[email protected]>
Newsgroups gmane.comp.gnome.ximian.setup-tool
Message-ID <1111373619.5167.134.camel__14161.3254593269$1111373616$gmane$org@filemon>
Hi,

On Wed, 2005-03-16 at 23:52 +0100, Guillaume Desmottes wrote:
> Hi!
> 
> I'm writing a patch for ubuntu to give the possibility for the user to
> install (with synaptic) samba and/or NFS when he launch shares-admin and
> none of these services are installed.
> 
> To do this, i need to "reload" 2 values from the backend.
> Indeed, after the installation of samba (or nfs)
> gst_xml_element_get_boolean (root, "smbinstalled")
> return again false (i suppose these values are loaded at the init of the
> program from the backennd).

Unfortunately, you can't just extract just a couple of values (ATM),
you'd have to reload all the configuration (when the tool starts, it
does --get to the backend, getting the whole XML), so you could make
something like:

tool->config = gst_tool_run_directive (tool, NULL, "get", NULL);

But this would replace any change done with the old config, so you might
do 2 things:

1) Store the possibly modified config in an auxiliar xmlDocPtr for
mixing both of them after installing the package
2) Just update the "smbinstalled" tag with gst_xml_element_set_boolean()
if you know whether it was installed correctly :)

I'm very sorry that there isn't a better method for doing this, I'm
already working in a solution

	Regards
	

> 
> I'm not familiar with the backend (and Perl in general) so, i would like
> to know how to solve this problem.
> 
> Thanks a lot :)
> 
> 	Guillaume
> 
> _______________________________________________
> system-tools-list mailing list
> [email protected]
> http://mail.gnome.org/mailman/listinfo/system-tools-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.