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, self.arches,
'tar.gz', 'tar.gz',
'lorax', 'lorax',
'buildiso',
self.log self.log
) )
else: else:
@ -1359,6 +1360,7 @@ class IsoBuild:
arches_to_unpack, arches_to_unpack,
formattype, formattype,
variantname, variantname,
'buildimage',
self.log self.log
) )

View File

@ -607,7 +607,8 @@ class Shared:
# pylint: disable=too-many-locals,too-many-arguments # pylint: disable=too-many-locals,too-many-arguments
@staticmethod @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 Using native s3, determine the latest artifacts and return a dict
""" """
@ -640,8 +641,9 @@ class Shared:
for arch in arches: for arch in arches:
temps = [] temps = []
start_of_path = f'{root_prefix}-{release.split('.')[0]}-{arch}'
for y in temp: for y in temp:
if arch in y: if arch in y and start_of_path in y:
temps.append(y) temps.append(y)
temps.sort(reverse=True) temps.sort(reverse=True)
if len(temps) > 0: if len(temps) > 0: