inputs/files: rename refs to files
The `org.osbuild.files` input provides individual files to a stage. Change the `refs` key in the returned dict to `files` to better reflect that fact. Also adapt the documentation to indicate that the keys actually paths and not necessarily checksums. This prepares for future extension of the `files` input to pipeline origins.
This commit is contained in:
parent
a3ea8dc748
commit
a2c926654c
2 changed files with 7 additions and 7 deletions
|
|
@ -5,8 +5,8 @@ Inputs for individual files
|
|||
Provides all the files, named via their content hash, specified
|
||||
via `references` in a new directory.
|
||||
|
||||
The returned data in `refs` is a dictionary where the keys are
|
||||
the content hash of a file and the values dictionaries with
|
||||
The returned data in `files` is a dictionary where the keys are
|
||||
paths to the provided files and the values dictionaries with
|
||||
metadata for it. The input itself currently does not set any
|
||||
metadata itself, but will forward any metadata set via the
|
||||
`metadata` property. Keys in that must start with a prefix,
|
||||
|
|
@ -86,7 +86,7 @@ class FilesInput(inputs.InputService):
|
|||
reply = {
|
||||
"path": target,
|
||||
"data": {
|
||||
"refs": refs
|
||||
"files": refs
|
||||
}
|
||||
}
|
||||
return reply
|
||||
|
|
|
|||
|
|
@ -213,8 +213,8 @@ def parse_input(inputs):
|
|||
packages = inputs["packages"]
|
||||
path = packages["path"]
|
||||
data = packages["data"]
|
||||
refs = data["refs"]
|
||||
return path, refs
|
||||
files = data["files"]
|
||||
return path, files
|
||||
|
||||
|
||||
def main(tree, inputs, options):
|
||||
|
|
@ -231,13 +231,13 @@ def main(tree, inputs, options):
|
|||
], check=True)
|
||||
print("imported gpg key")
|
||||
|
||||
for checksum, data in packages.items():
|
||||
for filename, data in packages.items():
|
||||
if data.get("rpm.check_gpg"):
|
||||
subprocess.run([
|
||||
"rpmkeys",
|
||||
"--root", tree,
|
||||
"--checksig",
|
||||
checksum
|
||||
filename
|
||||
], cwd=pkgpath, stdout=subprocess.DEVNULL, check=True)
|
||||
|
||||
script = f"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue