extra_iso: Set unified flag in metadata
This will avoid conflict in productmd that two images share the same attributes. JIRA: COMPOSE-2908 Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
parent
828557b4d6
commit
3419762830
@ -226,7 +226,9 @@ class CreateIsoThread(WorkerThread):
|
||||
variant=str(variant))
|
||||
|
||||
|
||||
def add_iso_to_metadata(compose, variant, arch, iso_path, bootable, disc_num, disc_count):
|
||||
def add_iso_to_metadata(
|
||||
compose, variant, arch, iso_path, bootable, disc_num, disc_count, unified=False
|
||||
):
|
||||
img = Image(compose.im)
|
||||
img.path = iso_path.replace(compose.paths.compose.topdir(), '').lstrip('/')
|
||||
img.mtime = get_mtime(iso_path)
|
||||
@ -240,6 +242,7 @@ def add_iso_to_metadata(compose, variant, arch, iso_path, bootable, disc_num, di
|
||||
img.bootable = bootable
|
||||
img.subvariant = variant.uid
|
||||
img.implant_md5 = iso.get_implanted_md5(iso_path, logger=compose._logger)
|
||||
img.unified = unified
|
||||
setattr(img, 'can_fail', compose.can_fail(variant, arch, 'iso'))
|
||||
setattr(img, 'deliverable', 'iso')
|
||||
try:
|
||||
|
@ -112,7 +112,9 @@ class ExtraIsosThread(WorkerThread):
|
||||
arch, "extraiso-%s" % os.path.basename(iso_path)),
|
||||
with_jigdo=False)
|
||||
|
||||
add_iso_to_metadata(compose, variant, arch, iso_path, bootable, 1, 1)
|
||||
add_iso_to_metadata(
|
||||
compose, variant, arch, iso_path, bootable, 1, 1, unified=True
|
||||
)
|
||||
|
||||
self.pool.log_info("[DONE ] %s" % msg)
|
||||
|
||||
|
@ -147,7 +147,7 @@ class ExtraIsosThreadTest(helpers.PungiTestCase):
|
||||
aitm.call_args_list,
|
||||
[mock.call(compose, server, 'x86_64',
|
||||
os.path.join(self.topdir, 'compose/Server/x86_64/iso/my.iso'),
|
||||
True, 1, 1)]
|
||||
True, 1, 1, unified=True)]
|
||||
)
|
||||
|
||||
def test_binary_image_custom_naming(self, aitm, rcc, gef, gic, gfn, gvi):
|
||||
@ -188,7 +188,7 @@ class ExtraIsosThreadTest(helpers.PungiTestCase):
|
||||
aitm.call_args_list,
|
||||
[mock.call(compose, server, 'x86_64',
|
||||
os.path.join(self.topdir, 'compose/Server/x86_64/iso/my.iso'),
|
||||
False, 1, 1)]
|
||||
False, 1, 1, unified=True)]
|
||||
)
|
||||
|
||||
def test_source_is_not_bootable(self, aitm, rcc, gef, gic, gfn, gvi):
|
||||
@ -230,7 +230,7 @@ class ExtraIsosThreadTest(helpers.PungiTestCase):
|
||||
aitm.call_args_list,
|
||||
[mock.call(compose, server, 'src',
|
||||
os.path.join(self.topdir, 'compose/Server/source/iso/my.iso'),
|
||||
False, 1, 1)]
|
||||
False, 1, 1, unified=True)]
|
||||
)
|
||||
|
||||
def test_failable_failed(self, aitm, rcc, gef, gic, gfn, gvi):
|
||||
|
Loading…
Reference in New Issue
Block a user