NetworkManager/docs
Thomas Haller 03b9a255d2
libnm: remove unused "nm-property-compare.c"
"nm-property-compare.c" only contains nm_property_compare(), which is
broken.

It tries to compare string dictionaries as equal regardless of the
order of elements. It gets it wrong, for dictionaries with duplicate
keys. Which means, it can only be used with trusted variants that are
known to not contain duplicates. Which is quite a non-starter.

Also, the idea of a compare function for GVariant that ignores the order
of dictionary elements seems wrong. Even if for a certain application
the order does not matter, it still depends what the upper layer makes
of duplicate keys (will they bail out, or take the first/last occurrence
of a duplicate key?). nm_property_compare() doesn't have the knowledge
how upper layer handles it, and it's not obvious what's the right
choice. For example, if you use g_variant_lookup(), the first occurrence
is preferred. If you iterate over the children, possibly later
occurrences overwrite earlier ones.

It's ill defined, and maybe shouldn't be done. What should instead
happen, is that upper layers normalize (sort, uniquify) the keys, so
that we can do a full comparison. For that we have nm_g_variant_cmp().

Drop the now unused code. The core of the function still exists as
nm_g_variant_cmp().
2024-01-04 10:03:00 +01:00
..
api HSR: add support to HSR/PRP interface 2023-12-05 08:05:56 +01:00
internal docs: add daemon internal documentation 2023-06-27 14:29:18 +02:00
libnm libnm: remove unused "nm-property-compare.c" 2024-01-04 10:03:00 +01:00
meson.build all: update deprecated SPDX license identifiers 2021-01-05 09:46:21 +01:00
sandboxing.md docs: add "sandboxing.md" 2022-03-28 18:04:18 +02:00