ostree_container: make filename configurable, include arch
The default base name is probably fine in most cases, but there are some where we might want to tweak it. We already allow this for other phases (e.g. the livemedia phase). Also, we should include the arch in the image filename. Not doing this doesn't blow up the compose as, while they have identical filenames, the images for different arches are in different paths, but it's confusing for people who actually download and use the images. Signed-off-by: Adam Williamson <awilliam@redhat.com> (cherry picked from commit aea8da5225aeb31b4c5dd413f0a31b6ab395a9ac)
This commit is contained in:
parent
a0a155ebcd
commit
a24c6d52ce
@ -1887,9 +1887,14 @@ will thus create a new OCI archive image *from scratch*.
|
||||
* ``runroot_packages`` -- (*list*) A list of additional package names to be
|
||||
installed in the runroot environment in Koji.
|
||||
* ``subvariant`` -- (*str*) The subvariant value to be used in the metadata
|
||||
for the image. Also used in the image's filename. Defaults to being the
|
||||
same as the variant. If building more than one ostree container in a
|
||||
variant, each must have a unique subvariant.
|
||||
for the image. Also used in the image's filename, unless overridden by
|
||||
``name``. Defaults to being the same as the variant. If building more
|
||||
than one ostree container in a variant, each must have a unique
|
||||
subvariant.
|
||||
* ``name`` -- (*str*) The base for the image's filename. To produce the
|
||||
complete filename, the image's architecture, the version string, and the
|
||||
format suffix are appended to this. Defaults to the value of
|
||||
``release_short`` and the subvariant, joined by a dash.
|
||||
|
||||
Example config
|
||||
--------------
|
||||
|
@ -1115,6 +1115,7 @@ def make_schema():
|
||||
"$ref": "#/definitions/list_of_strings",
|
||||
},
|
||||
"subvariant": {"type": "string"},
|
||||
"name": {"type": "string"},
|
||||
},
|
||||
"required": [
|
||||
"treefile",
|
||||
|
@ -123,11 +123,8 @@ class OSTreeContainerThread(WorkerThread):
|
||||
target_dir = compose.paths.compose.image_dir(variant) % {"arch": arch}
|
||||
util.makedirs(target_dir)
|
||||
version = util.version_generator(compose, config.get("version"))
|
||||
archive_name = "%s-%s-%s" % (
|
||||
compose.conf["release_short"],
|
||||
subvariant,
|
||||
version,
|
||||
)
|
||||
anb = config.get("name", "%s-%s" % (compose.conf["release_short"], subvariant))
|
||||
archive_name = "%s-%s-%s" % (anb, arch, version)
|
||||
|
||||
# Run the pungi-make-ostree command locally to create a script to
|
||||
# execute in runroot environment.
|
||||
|
Loading…
Reference in New Issue
Block a user