pf.Pkg._access(): Use Distro.paths()

Distro.paths() now allows to spare a detour in Pkg._access() - we can
directly get to the list of paths instead of via Distro.select() ->
pkg_paths().

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-11-12 16:03:58 +01:00
commit ea751d3949
Signed by: Jan Lindemann
GPG key ID: 3750640C9E25DD61

View file

@ -92,6 +92,16 @@ class _FakeDistro:
ret.extend(files)
return ret
async def paths(self, filter: Any = None, pkg_names: Any = []) -> list[str]:
ret: list[str] = []
for p, files in self.__pkgs:
if filter is not None and not filter.match_pkg(p):
continue
if pkg_names and p.name not in pkg_names:
continue
ret.extend(files)
return ret
fake = _FakeDistro(
[
(