updatectl: fix feature JSON parsing
The feature JSON payload switched to `id`, `isEnabled`, and `appstream`, and made `documentation` an array of URLs. `updatectl` still parsed legacy table-derived names and a single URL. This broke feature JSON parsing and made output inconsistent. Features without documentation could also cause a null dereference. Align `updatectl` with the current schema and preserve all documentation URLs across sysupdate, D-Bus, and Varlink payloads. Propagate condition evaluation errors through `condition_test_list()` and `feature_is_suggested()`, with consistent JSON error handling and tests. The `suggested` field is now optional and always a boolean when present; it is omitted rather than set to an error string when SuggestOn*= conditions cannot be evaluated. Add `suggested` metadata and document the field transition. Follow-up for3e34ccf6df. Follow-up for75a247d4de. Follow-up for40e727c93b. Fixes #43603
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
8839a9810e
commit
a6f7ded859
@@ -98,8 +98,9 @@
|
||||
<varlistentry>
|
||||
<term><varname>Documentation=</varname></term>
|
||||
|
||||
<listitem><para>A user-presentable URL to documentation about this component.
|
||||
This setting supports specifier expansion; see below for details on supported specifiers.</para>
|
||||
<listitem><para>One or more user-presentable URLs to documentation about this component. This setting may be
|
||||
specified more than once. If the empty string is assigned to this option, the list is reset, and all prior
|
||||
assignments have no effect. It supports specifier expansion; see below for details on supported specifiers.</para>
|
||||
|
||||
<xi:include href="version-info.xml" xpointer="v262"/></listitem>
|
||||
</varlistentry>
|
||||
|
||||
Reference in New Issue
Block a user