forked from sig_core/toolkit
fix: ensures skipped images are not in the list for podman
This commit is contained in:
parent
30a84cfed5
commit
b53afe66e2
@ -725,8 +725,7 @@ class IsoBuild:
|
|||||||
|
|
||||||
def _extra_iso_build_wrap(self):
|
def _extra_iso_build_wrap(self):
|
||||||
"""
|
"""
|
||||||
Try to figure out where the build is going, we only support mock for
|
Try to figure out where the build is going, podman or mock.
|
||||||
now.
|
|
||||||
"""
|
"""
|
||||||
work_root = os.path.join(
|
work_root = os.path.join(
|
||||||
self.compose_latest_dir,
|
self.compose_latest_dir,
|
||||||
@ -737,13 +736,16 @@ class IsoBuild:
|
|||||||
if self.arch:
|
if self.arch:
|
||||||
arches_to_build = [self.arch]
|
arches_to_build = [self.arch]
|
||||||
|
|
||||||
images_to_build = self.iso_map['images']
|
images_to_build = list(self.iso_map['images'].keys())
|
||||||
if self.extra_iso:
|
if self.extra_iso:
|
||||||
images_to_build = [self.extra_iso]
|
images_to_build = [self.extra_iso]
|
||||||
|
|
||||||
|
images_to_skip = []
|
||||||
|
|
||||||
for y in images_to_build:
|
for y in images_to_build:
|
||||||
if 'isoskip' in self.iso_map['images'][y] and self.iso_map['images'][y]['isoskip']:
|
if 'isoskip' in self.iso_map['images'][y] and self.iso_map['images'][y]['isoskip']:
|
||||||
self.log.info(Color.WARN + f'Skipping {y} image')
|
self.log.info(Color.WARN + f'Skipping {y} image')
|
||||||
|
images_to_skip.append(y)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
reposcan = True
|
reposcan = True
|
||||||
@ -788,7 +790,14 @@ class IsoBuild:
|
|||||||
raise SystemExit()
|
raise SystemExit()
|
||||||
|
|
||||||
if self.extra_iso_mode == 'podman':
|
if self.extra_iso_mode == 'podman':
|
||||||
self._extra_iso_podman_run(arches_to_build, images_to_build, work_root)
|
# I can't think of a better way to do this
|
||||||
|
images_to_build_podman = images_to_build.copy()
|
||||||
|
for item in images_to_build_podman[:]:
|
||||||
|
for skip in images_to_skip:
|
||||||
|
if item == skip:
|
||||||
|
images_to_build_podman.remove(item)
|
||||||
|
|
||||||
|
self._extra_iso_podman_run(arches_to_build, images_to_build_podman, work_root)
|
||||||
|
|
||||||
def _extra_iso_local_config(self, arch, image, grafts, work_root, volname):
|
def _extra_iso_local_config(self, arch, image, grafts, work_root, volname):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user