Skip to content

Commit

Permalink
add root_prefix requirement for shared func
Browse files Browse the repository at this point in the history
  • Loading branch information
nazunalika committed May 5, 2024
1 parent 439f1f7 commit 441eaa7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions iso/empanadas/empanadas/util/iso_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ def run_pull_lorax_artifacts(self):
self.arches,
'tar.gz',
'lorax',
'buildiso',
self.log
)
else:
Expand Down Expand Up @@ -1359,6 +1360,7 @@ def run_pull_generic_images(self):
arches_to_unpack,
formattype,
variantname,
'buildimage',
self.log
)

Expand Down
6 changes: 4 additions & 2 deletions iso/empanadas/empanadas/util/shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,8 @@ def rsync_method(src, dest):

# pylint: disable=too-many-locals,too-many-arguments
@staticmethod
def s3_determine_latest(s3_bucket, release, arches, filetype, name, logger):
def s3_determine_latest(s3_bucket, release, arches, filetype, name,
root_prefix, logger):
"""
Using native s3, determine the latest artifacts and return a dict
"""
Expand Down Expand Up @@ -640,8 +641,9 @@ def s3_determine_latest(s3_bucket, release, arches, filetype, name, logger):

for arch in arches:
temps = []
start_of_path = f'{root_prefix}-{release.split('.')[0]}-{arch}'
for y in temp:
if arch in y:
if arch in y and start_of_path in y:
temps.append(y)
temps.sort(reverse=True)
if len(temps) > 0:
Expand Down

0 comments on commit 441eaa7

Please sign in to comment.