Re: [libvirt-designer][PATCH v2 1/4] Load osinfo DB on init

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 12, 2012 at 11:48:31AM +0200, Michal Privoznik wrote:
> > 
> > 
> >> +    osinfo_loader = osinfo_loader_new();
> >> +    osinfo_loader_process_default_path(osinfo_loader, err);
> >> +    if (err)
> >> +        return FALSE;
> > 
> > I'm not sure we want to error out there, see
> > http://git.fedorahosted.org/cgit/libosinfo.git/commit/?id=dbde512c3a64640d61fa5e7f801050e248f60c98
> > for my reasoning (and you can try a "mkdir -p ~/.config/libosinfo/db &&
> > echo '<bad' >~/.config/libosinfo/db/broken.xml" to get into a 'bad'
> > situation).
> 
> IIUC, malformed XML doesn't affect loading of other well-formed XMLs,
> right? If this is the case, then yes - we should not report error.
> However, if malformed XML results in empty libosinfo DB, then we must
> report error here as non-empty DB is crucial for libvirt-designer.

Malformed XML will not prevent other database files from being loaded, but
libosinfo still reports an error in this case. However, osinfo-detect will
still be working as expected, you can test it with the example I provided.
Maybe it should be up to libosinfo not to error out on invalid XML files,
but to have additional API for users who want to be informed about anything
going wrong in the loading process.

Christophe

Attachment: pgpBzJiFD_1qQ.pgp
Description: PGP signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]