Update from upstream #11

Closed
soksanichenko wants to merge 158 commits from a8_updated into a8
Showing only changes of commit 7b9e08ab28 - Show all commits

View File

@ -18,6 +18,7 @@ import os
from pungi.phases.base import PhaseBase
from pungi.util import failable, get_arch_variant_data
import productmd.compose
class TestPhase(PhaseBase):
@ -25,6 +26,7 @@ class TestPhase(PhaseBase):
def run(self):
check_image_sanity(self.compose)
check_image_metadata(self.compose)
def check_image_sanity(compose):
@ -45,6 +47,17 @@ def check_image_sanity(compose):
check_size_limit(compose, variant, arch, img)
def check_image_metadata(compose):
"""
Check the images metadata for entries that cannot be serialized.
Often caused by isos with duplicate metadata.
Accessing the `images` attribute will raise an exception if there's a problem
"""
compose = productmd.compose.Compose(compose.paths.compose.topdir())
return compose.images
def check_sanity(compose, variant, arch, image):
path = os.path.join(compose.paths.compose.topdir(), image.path)
deliverable = getattr(image, "deliverable")