stages/rpm: sort packages metadata
In order to have a more stable package metadata representation, sort the generated metadata by name. Adapt the tests' metadata file to reflect that change.
This commit is contained in:
parent
b4f58ccc72
commit
1329fc2ca7
2 changed files with 1922 additions and 1917 deletions
|
|
@ -37,6 +37,7 @@ import pathlib
|
|||
import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
from operator import itemgetter
|
||||
|
||||
from osbuild import api
|
||||
|
||||
|
|
@ -162,7 +163,12 @@ def generate_package_metadata(tree):
|
|||
|
||||
raw = res.stdout.strip()
|
||||
jsdata = '{"packages": [' + raw[:-1] + "]}"
|
||||
return json.loads(jsdata)
|
||||
data = json.loads(jsdata)
|
||||
|
||||
data["packages"] = sorted(data["packages"],
|
||||
key=itemgetter("name"))
|
||||
|
||||
return data
|
||||
|
||||
|
||||
def disable_dracut(tree):
|
||||
|
|
@ -254,7 +260,6 @@ def main(tree, inputs, options):
|
|||
|
||||
subprocess.run(["/bin/sh", "-c", script], check=True)
|
||||
|
||||
|
||||
extra_args = []
|
||||
|
||||
if options.get("exclude", {}).get("docs"):
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue