Skip to content

Commit b53afe6

Browse files
committed
fix: ensures skipped images are not in the list for podman
1 parent 30a84cf commit b53afe6

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

iso/empanadas/empanadas/util/iso_utils.py

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -725,8 +725,7 @@ def run_build_extra_iso(self):
725725

726726
def _extra_iso_build_wrap(self):
727727
"""
728-
Try to figure out where the build is going, we only support mock for
729-
now.
728+
Try to figure out where the build is going, podman or mock.
730729
"""
731730
work_root = os.path.join(
732731
self.compose_latest_dir,
@@ -737,13 +736,16 @@ def _extra_iso_build_wrap(self):
737736
if self.arch:
738737
arches_to_build = [self.arch]
739738

740-
images_to_build = self.iso_map['images']
739+
images_to_build = list(self.iso_map['images'].keys())
741740
if self.extra_iso:
742741
images_to_build = [self.extra_iso]
743742

743+
images_to_skip = []
744+
744745
for y in images_to_build:
745746
if 'isoskip' in self.iso_map['images'][y] and self.iso_map['images'][y]['isoskip']:
746747
self.log.info(Color.WARN + f'Skipping {y} image')
748+
images_to_skip.append(y)
747749
continue
748750

749751
reposcan = True
@@ -788,7 +790,14 @@ def _extra_iso_build_wrap(self):
788790
raise SystemExit()
789791

790792
if self.extra_iso_mode == 'podman':
791-
self._extra_iso_podman_run(arches_to_build, images_to_build, work_root)
793+
# I can't think of a better way to do this
794+
images_to_build_podman = images_to_build.copy()
795+
for item in images_to_build_podman[:]:
796+
for skip in images_to_skip:
797+
if item == skip:
798+
images_to_build_podman.remove(item)
799+
800+
self._extra_iso_podman_run(arches_to_build, images_to_build_podman, work_root)
792801

793802
def _extra_iso_local_config(self, arch, image, grafts, work_root, volname):
794803
"""

0 commit comments

Comments
 (0)