lib.DistroContext: Remove dead code from install()

Remove unused helper functions from install(): _matches_host_prefix(), _crop_host_prefix(), _crop_default_prefix(), and _matches_default_prefix().

Assisted-by: unsloth/Qwen3.6-35B-A3B-GGUF:IQ4_NL with pi.dev v0.80.2
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-07-01 16:05:08 +02:00
commit 95a2d8a867
Signed by: Jan Lindemann
GPG key ID: 3750640C9E25DD61

View file

@ -112,18 +112,6 @@ class DistroContext(FilesContext):
ec = Local() ec = Local()
return (await get(src_uri, content_filter = ProcFilterGpg(ec = ec))).stdout return (await get(src_uri, content_filter = ProcFilterGpg(ec = ec))).stdout
def _matches_host_prefix(path: str) -> bool:
return re.match(r'^' + host_root_in_tar, path) is not None
def _crop_host_prefix(path: str) -> bool:
return re.sub(r'^' + host_root_in_tar, '', path) is not None
def _crop_default_prefix(path: str) -> bool:
return re.sub(default_rx, '', path) is not None
def _matches_default_prefix(path: str) -> bool:
return re.match(r'^default', path) is not None
def _is_needed_secret(path: str) -> bool: def _is_needed_secret(path: str) -> bool:
return path in secret_paths return path in secret_paths