diff --git a/src/python/jw/pkg/cmds/secrets/lib/DistroContext.py b/src/python/jw/pkg/cmds/secrets/lib/DistroContext.py index 3006a1a2..de01258f 100644 --- a/src/python/jw/pkg/cmds/secrets/lib/DistroContext.py +++ b/src/python/jw/pkg/cmds/secrets/lib/DistroContext.py @@ -33,11 +33,12 @@ class DistroContext(FilesContext): self.__distro = distro async def match_files(self, pkg_names: Collection[str], pattern: str) -> list[str]: + # -- One query for the whole name list: the distro backends + # accept a list and issue a single file-listing command ret: list[str] = [] - for pkg_name in pkg_names: - for path in await self.__distro.pkg_paths(pkg_name): - if re.match(pattern, path): - ret.append(path) + for path in await self.__distro.pkg_paths(list(pkg_names)): + if re.match(pattern, path): + ret.append(path) return ret async def list_template_files(self, pkg_names: Collection[str]) -> list[str]: