From: Patrick Talbert <ptalb...@redhat.com> [redhat] scripts: sort dumped keys in uki_create_json.py
The order of the keys in the json output may change causing unnecessary churn in the dist-git diffs. Fix this by setting sort_keys=True in the json.dump() call. Outside of locale sorting differences this should provide a more stable experience. Signed-off-by: Patrick Talbert <ptalb...@redhat.com> diff --git a/redhat/scripts/uki_addons/uki_create_json.py b/redhat/scripts/uki_addons/uki_create_json.py index blahblah..blahblah 100755 --- a/redhat/scripts/uki_addons/uki_create_json.py +++ b/redhat/scripts/uki_addons/uki_create_json.py @@ -86,7 +86,7 @@ def create_json(addons): def write_json(obj, dest_file): with open(dest_file, 'w') as f: - json.dump(obj , f, indent=4) + json.dump(obj , f, indent=4, sort_keys=True) print(f'Processed addons files are in {dest_file}') if __name__ == "__main__": -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/3817 -- _______________________________________________ kernel mailing list -- kernel@lists.fedoraproject.org To unsubscribe send an email to kernel-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue