Open mcrha opened 5 months ago
@cgwalters In the meantime, can you give some indication about the stability of the block
format? We could get gnome-software to parse it in the meantime, while waiting for JSON support, if it’s not likely to change as a format during that time.
(Obviously anything you say doesn’t have to be a hard API guarantee, just an indication or best-effort kind of thing.)
I am 99.9% sure no one is going to have any reason to touch any of the block format code in any near future and we can add a gating CI test that the format doesn't change.
Thanks for the reply! I don’t think there’s a need to add a CI test for it — gnome-software is only going to use this on a best-effort basis to show which packages are being updated inside a high-level ‘OS updates’ bundle. Very few users will look at the list of packages, so it doesn’t matter if it breaks at some point. Hopefully by then we can use the JSON instead.
Describe the bug
This request is related to this downstream work:
https://gitlab.gnome.org/GNOME/gnome-software/-/merge_requests/1947
The gnome-software currently reads the
--format=block
changelogs and presents that to the user. Two things:block
format stable? That's because gnome-software expects certain format and parses it from the free text, thus when you change the format it'll break the code.Reproduction steps
run
rpm-ostree db diff --changelogs --format=json
Expected behavior
changelog exported in json format.
Actual behavior
The command currently returns error that json format is not supported for changelogs. There is a code to generate json format without changelogs already.
System details
not applicable, though using rpm-ostree-2024.4-5.fc40
Additional information
For example:
generates here (I skipped some lines for readability):
while
returns:
It would be nice to have the
Changelogs
beside the"PreviousPackage"
and"NewPackage"
, like:where the
date
is in seconds since epoch and in UTC, but it can be also asYYYY-MM-DD
, as it's a date only after all.