Skip to content

Commit

Permalink
fix: ensures skipped images are not in the list for podman
Browse files Browse the repository at this point in the history
  • Loading branch information
nazunalika committed Oct 1, 2024
1 parent 30a84cf commit b53afe6
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions iso/empanadas/empanadas/util/iso_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -725,8 +725,7 @@ def run_build_extra_iso(self):

def _extra_iso_build_wrap(self):
"""
Try to figure out where the build is going, we only support mock for
now.
Try to figure out where the build is going, podman or mock.
"""
work_root = os.path.join(
self.compose_latest_dir,
Expand All @@ -737,13 +736,16 @@ def _extra_iso_build_wrap(self):
if 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:
images_to_build = [self.extra_iso]

images_to_skip = []

for y in images_to_build:
if 'isoskip' in self.iso_map['images'][y] and self.iso_map['images'][y]['isoskip']:
self.log.info(Color.WARN + f'Skipping {y} image')
images_to_skip.append(y)
continue

reposcan = True
Expand Down Expand Up @@ -788,7 +790,14 @@ def _extra_iso_build_wrap(self):
raise SystemExit()

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):
"""
Expand Down

0 comments on commit b53afe6

Please sign in to comment.