[Libosinfo] [osinfo-db, libosinfo PATCH v2 0/6] Add support for resources' inheritance

Fabiano Fidêncio fidencio at redhat.com
Wed Nov 14 11:25:40 UTC 2018


This patch set introduces resources' inheritance for OSes that
derive-from/clone a device that already has its resources set.

While this patch doesn't cause any harm per si, we should wait at least
1 or 2 releases (after the one that includes this series) to start
removing the duplicated entries from osinfo-db.

- Changes since v1:
  https://www.redhat.com/archives/libosinfo/2018-November/msg00094.html
  - Changed the schema in order to explicitly indicate that the
    resources should be inherited
  - Addressed Pino's comments on using g_assert_true() instead of just
    g_assert()

- osinfo-db:
  Fabiano Fidêncio (1):
    schema: Add 'inherit' attribute to resources element

   data/schema/osinfo.rng.in | 5 +++++
   1 file changed, 5 insertions(+)

- libosinfo:
  Fabiano Fidêncio (5):
    resources: Add osinfo_resources_{get,set}_inherit()
    loader: Set "inherit" accordingly to the resources
    os: Add _get_.*_resources_without_inheritance()
    os: Support inherited resources
    test-os: Add test_resources_inheritance()

   osinfo/Makefile.am                            |   2 +
   osinfo/osinfo_loader.c                        |   7 +-
   osinfo/osinfo_os.c                            | 143 +++++++++++++++-
   osinfo/osinfo_os_private.h                    |  39 +++++
   osinfo/osinfo_resources.c                     |  33 +++-
   osinfo/osinfo_resources_private.h             |  40 +++++
   .../test-os-resources-inheritance-1.xml       |  25 +++
   .../test-os-resources-inheritance-2.xml       |  12 ++
   .../test-os-resources-inheritance-3.xml       |  21 +++
   .../test-os-resources-inheritance-4.xml       |  21 +++
   .../test-os-resources-inheritance-5.xml       |  12 ++
   tests/test-os.c                               | 162 ++++++++++++++++++
   12 files changed, 511 insertions(+), 6 deletions(-)
   create mode 100644 osinfo/osinfo_os_private.h
   create mode 100644 osinfo/osinfo_resources_private.h
   create mode 100644 tests/dbdata/os/libosinfo.org/test-os-resources-inheritance-1.xml
   create mode 100644 tests/dbdata/os/libosinfo.org/test-os-resources-inheritance-2.xml
   create mode 100644 tests/dbdata/os/libosinfo.org/test-os-resources-inheritance-3.xml
   create mode 100644 tests/dbdata/os/libosinfo.org/test-os-resources-inheritance-4.xml
   create mode 100644 tests/dbdata/os/libosinfo.org/test-os-resources-inheritance-5.xml

-- 
2.19.1




More information about the Libosinfo mailing list