This patchseries aim to have OSes properly dealing with deprecated and removed devices. The path I've taken is: - Use OsinfoDeviceLink to store whether the device is deprecated/removed - Add a new API in OsinfoOs that says whether a device is deprecated or not - Filter out the removed devices from _get_devices(), _get_device_links(), _get_all_devices() and _get_all_device_links() - A bunch of tests to ensure I'm not breaking anything, neither that something will end up broken in the future; Now, questions ... - Shall we do the same for platform and deployment? - I've introduced and exposed osinfo_os_get_all_device_links(), and the rationale for exposing it is basically for coherence with the osinfo_os_get_all_devices() .... However, it could totally be a private method. What's the preference here? *osinfo-db: Fabiano Fidêncio (2): schema: Add "deprecated" attribute to device element schema: Add "removed" attribute to devices element data/schema/osinfo.rng.in | 10 ++++++++++ 1 file changed, 10 insertions(+) *libosinfo: Fabiano Fidêncio (16): devicelinklist: Fix _get_devices() tests: Add basic tests for devicelinklist test-devicelinklist: Add _get_devices() test tests-os: Add test_devices_inheritance_basic() loader: Deal with "deprecated" devices for an OS os: Add osinfo_os_get_all_device_links() test-os: Add test_devices_inheritance_deprecation() loader: Deal with "removed" devices for an OS os: Add osinfo_os_get_devices_internal() os: Add osinfo_os_get_device_links_internal() os: Add osinfo_os_get_all_device_links_internal() os: Use get_devices_internal in _get_all callback os: Use get_device_links_internal in _get_all callback os: Add add_entity_to_list_check() os: Deal with "removed" devices test-os: Add test_devices_inheritance_removal() osinfo/libosinfo.syms | 4 + osinfo/osinfo_devicelink.h | 2 + osinfo/osinfo_devicelinklist.c | 6 +- osinfo/osinfo_loader.c | 18 + osinfo/osinfo_os.c | 265 +++++++++++++-- osinfo/osinfo_os.h | 2 + tests/Makefile.am | 5 + .../device/libosinfo.org/test-device-one.xml | 7 + .../libosinfo.org/test-os-devices-basic-1.xml | 13 + .../test-os-devices-basic-2-clone.xml | 10 + .../libosinfo.org/test-os-devices-basic-2.xml | 10 + .../test-os-devices-deprecated-1.xml | 14 + .../test-os-devices-deprecated-2-clone.xml | 10 + .../test-os-devices-deprecated-2.xml | 10 + .../test-os-devices-deprecated-3.xml | 14 + .../test-os-devices-deprecated-4-clone.xml | 10 + .../test-os-devices-deprecated-4.xml | 10 + .../test-os-devices-removed-1.xml | 14 + .../test-os-devices-removed-2-clone.xml | 10 + .../test-os-devices-removed-2.xml | 10 + .../test-os-devices-removed-3.xml | 14 + .../test-os-devices-removed-4-clone.xml | 10 + .../test-os-devices-removed-4.xml | 10 + tests/test-devicelinklist.c | 313 ++++++++++++++++++ tests/test-os.c | 268 +++++++++++++++ 25 files changed, 1032 insertions(+), 27 deletions(-) create mode 100644 tests/dbdata/device/libosinfo.org/test-device-one.xml create mode 100644 tests/dbdata/os/libosinfo.org/test-os-devices-basic-1.xml create mode 100644 tests/dbdata/os/libosinfo.org/test-os-devices-basic-2-clone.xml create mode 100644 tests/dbdata/os/libosinfo.org/test-os-devices-basic-2.xml create mode 100644 tests/dbdata/os/libosinfo.org/test-os-devices-deprecated-1.xml create mode 100644 tests/dbdata/os/libosinfo.org/test-os-devices-deprecated-2-clone.xml create mode 100644 tests/dbdata/os/libosinfo.org/test-os-devices-deprecated-2.xml create mode 100644 tests/dbdata/os/libosinfo.org/test-os-devices-deprecated-3.xml create mode 100644 tests/dbdata/os/libosinfo.org/test-os-devices-deprecated-4-clone.xml create mode 100644 tests/dbdata/os/libosinfo.org/test-os-devices-deprecated-4.xml create mode 100644 tests/dbdata/os/libosinfo.org/test-os-devices-removed-1.xml create mode 100644 tests/dbdata/os/libosinfo.org/test-os-devices-removed-2-clone.xml create mode 100644 tests/dbdata/os/libosinfo.org/test-os-devices-removed-2.xml create mode 100644 tests/dbdata/os/libosinfo.org/test-os-devices-removed-3.xml create mode 100644 tests/dbdata/os/libosinfo.org/test-os-devices-removed-4-clone.xml create mode 100644 tests/dbdata/os/libosinfo.org/test-os-devices-removed-4.xml create mode 100644 tests/test-devicelinklist.c -- 2.19.1 _______________________________________________ Libosinfo mailing list Libosinfo@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libosinfo