extra_isos: Provide arch to extra files getter

The getter is already running once per architecture, it just doesn't
make the information available to the scm wrapper.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
(cherry picked from commit 46d6c48e0a03146f05a996a9529cffbcbcc8447c)
This commit is contained in:
Lubomír Sedlář 2025-01-17 11:17:45 +01:00 committed by Stepan Oksanichenko
parent a034b8b977
commit cdc275741b
2 changed files with 19 additions and 4 deletions

View File

@ -349,7 +349,7 @@ def get_extra_files(compose, variant, arch, extra_files):
target_path = os.path.join(extra_files_dir, target).rstrip("/") target_path = os.path.join(extra_files_dir, target).rstrip("/")
filelist.extend( filelist.extend(
os.path.join(target, f) os.path.join(target, f)
for f in getter(scm_dict, target_path, compose=compose) for f in getter(scm_dict, target_path, compose=compose, arch=arch)
) )
if filelist: if filelist:

View File

@ -537,7 +537,14 @@ class GetExtraFilesTest(helpers.PungiTestCase):
self.assertEqual(get_dir.call_args_list, []) self.assertEqual(get_dir.call_args_list, [])
self.assertEqual( self.assertEqual(
get_file.call_args_list, get_file.call_args_list,
[mock.call(cfg, os.path.join(self.dir, "legalese"), compose=self.compose)], [
mock.call(
cfg,
os.path.join(self.dir, "legalese"),
compose=self.compose,
arch=self.arch,
)
],
) )
self.assertEqual( self.assertEqual(
populate_md.call_args_list, populate_md.call_args_list,
@ -566,7 +573,14 @@ class GetExtraFilesTest(helpers.PungiTestCase):
self.assertEqual(get_file.call_args_list, []) self.assertEqual(get_file.call_args_list, [])
self.assertEqual( self.assertEqual(
get_dir.call_args_list, get_dir.call_args_list,
[mock.call(cfg, os.path.join(self.dir, "foo"), compose=self.compose)], [
mock.call(
cfg,
os.path.join(self.dir, "foo"),
compose=self.compose,
arch=self.arch,
)
],
) )
self.assertEqual( self.assertEqual(
populate_md.call_args_list, populate_md.call_args_list,
@ -601,8 +615,9 @@ class GetExtraFilesTest(helpers.PungiTestCase):
cfg1, cfg1,
os.path.join(self.dir, "legalese"), os.path.join(self.dir, "legalese"),
compose=self.compose, compose=self.compose,
arch=self.arch,
), ),
mock.call(cfg2, self.dir, compose=self.compose), mock.call(cfg2, self.dir, compose=self.compose, arch=self.arch),
], ],
) )
self.assertEqual( self.assertEqual(