add root_prefix requirement for shared func

This commit is contained in:
Louis Abel 2024-05-04 18:17:23 -07:00
parent 439f1f7984
commit 441eaa778b
Signed by untrusted user: label
GPG key ID: 2A6975660E424560
2 changed files with 6 additions and 2 deletions

View file

@ -360,6 +360,7 @@ class IsoBuild:
self.arches,
'tar.gz',
'lorax',
'buildiso',
self.log
)
else:
@ -1359,6 +1360,7 @@ class IsoBuild:
arches_to_unpack,
formattype,
variantname,
'buildimage',
self.log
)

View file

@ -607,7 +607,8 @@ class Shared:
# 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
"""
@ -640,8 +641,9 @@ class Shared:
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: