Skip to content

Commit 8b32fc8

Browse files
committed
cmdlib: check for metadata key before rojig
We've been abusing the `rojig` key for a long time now to carry artifact name and summary information. Since then, a more appropriate `metadata key is now supported in the treefile for our purposes. Check the `metadata` key first, but fallback to the `rojig` key to give time for src config repos to migrate.
1 parent 01e4e55 commit 8b32fc8

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/cmdlib.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -259,10 +259,11 @@ prepare_build() {
259259
rpm-ostree compose tree --repo="${tmprepo}" --print-only "${manifest}" > "${flattened_manifest}"
260260
export flattened_manifest
261261

262-
# Abuse the rojig/name as the name of the VM images
263-
# Also grab rojig summary for image upload descriptions
264-
name=$(jq -r '.rojig.name' < "${flattened_manifest}")
265-
summary=$(jq -r '.rojig.summary' < "${flattened_manifest}")
262+
# Use metadata.name as the name of the VM images
263+
# Also grab metadata.summary for image upload descriptions
264+
# XXX: delete the rojig fallbacks once we've moved over to metadata
265+
name=$(jq -r '.metadata.name//.rojig.name' < "${flattened_manifest}")
266+
summary=$(jq -r '.metadata.summary//.rojig.summary' < "${flattened_manifest}")
266267
ref=$(jq -r '.ref//""' < "${flattened_manifest}")
267268
export name ref summary
268269
# And validate fields coreos-assembler requires, but not rpm-ostree

0 commit comments

Comments
 (0)