Skip to content

Fix hiding of database entries

Daniel P. Berrangé requested to merge berrange/libosinfo:override-fixes into master

The osinfo-db documentation says that a local admin/user can hide an entity from the system location:

[quote] If the file is zero-length or points to /dev/null, then this represents a black-out override. This indicates that the ENTITY-NAME.xml file from a lower priority directory MUST NOT be loaded. [/quote]

This does not, however, work at all. If a zero length file is given, it tries to parse this as XML and fails, causing the entire DB loading process to be aborted. This leaves the DB with dangling references.

If a symlink to /dev/null is given, it is entirely ignored because the file is a block device and we only try to load regular files. Instead of only loading regular files, we need to load any type of file that has a .xml extension.

This appears to be broken since the very first impl of the new DB loading process, despite having written the spec at the same time.

Merge request reports