diff --git a/pungi/phases/kiwibuild.py b/pungi/phases/kiwibuild.py index 400ea6a1..9b75dd7a 100644 --- a/pungi/phases/kiwibuild.py +++ b/pungi/phases/kiwibuild.py @@ -25,6 +25,7 @@ KIWIEXTENSIONS = [ ("fex", ["squashfs.xz"], "squashfs.xz"), ("fex", ["squashfs.gz"], "squashfs.gz"), ("fex", ["squashfs"], "squashfs"), + ("container", ["oci.tar.xz"], "tar.xz"), ] @@ -242,13 +243,15 @@ class RunKiwiBuildThread(WorkerThread): def _find_type_and_format(path): + # these are our kiwi-exclusive mappings for images whose extensions + # aren't quite the same as imagefactory. they come first as we + # want our oci.tar.xz mapping to win over the tar.xz one in + # EXTENSIONS + for type_, suffixes, format_ in KIWIEXTENSIONS: + if any(path.endswith(suffix) for suffix in suffixes): + return type_, format_ for type_, suffixes in EXTENSIONS.items(): for suffix in suffixes: if path.endswith(suffix): return type_, suffix - # these are our kiwi-exclusive mappings for images whose extensions - # aren't quite the same as imagefactory - for type_, suffixes, format_ in KIWIEXTENSIONS: - if any(path.endswith(suffix) for suffix in suffixes): - return type_, format_ return None, None diff --git a/pungi/phases/ostree_container.py b/pungi/phases/ostree_container.py index c50633db..c0179620 100644 --- a/pungi/phases/ostree_container.py +++ b/pungi/phases/ostree_container.py @@ -164,9 +164,9 @@ class OSTreeContainerThread(WorkerThread): # Update image manifest img = Image(compose.im) - # Get the manifest type from the config if supplied, otherwise we - # determine the manifest type based on the koji output - img.type = "ociarchive" + # these are hardcoded as they should always be correct, we + # could potentially allow overriding them via config though + img.type = "bootable-container" img.format = "ociarchive" img.path = os.path.relpath(fullpath, compose.paths.compose.topdir()) img.mtime = util.get_mtime(fullpath) diff --git a/setup.py b/setup.py index ce32847a..a4492a70 100755 --- a/setup.py +++ b/setup.py @@ -60,7 +60,7 @@ setup( "jsonschema", "kobo", "lxml", - "productmd>=1.23", + "productmd>=1.43", "dogpile.cache", ], extras_require={':python_version=="2.7"': ["enum34", "lockfile"]},