tools/mpp: sort urls for v2 manifests

The logic to sort urls was added globally in `mpp-import-pipeline`
but only the in the v1 code path was the `state.manifest_urls`
variable set and thus for v2 the actual sorting did not happen.
Fix this and set the `manifest_urls` to the `org.osbuild.curl`
items, which makes sense because we only know how to sort those.
This commit is contained in:
Christian Kellner 2021-06-22 16:29:28 +00:00 committed by Achilleas Koutsou
parent 4e7c63ce52
commit a350602a77
6 changed files with 352 additions and 348 deletions

View file

@ -156,6 +156,10 @@ def _manifest_parse_v2(state, manifest):
state.manifest = manifest
state.manifest_todo = todo
sources = _manifest_enter(manifest, "sources", {})
curl_source = _manifest_enter(sources, "org.osbuild.curl", {})
state.manifest_urls = _manifest_enter(curl_source, "items", {})
def _manifest_process_v2(state, todo):
manifest = state.manifest