wrapper: add WRAPPER_PATHS to point ccache and rust to predictable locations

This commit is contained in:
InsanePrawn 2022-08-29 19:52:12 +02:00
parent 94c9a99e2f
commit 035e197f64
2 changed files with 8 additions and 4 deletions

View file

@ -9,6 +9,11 @@ from config import config
from config.state import dump_file as dump_config_file
from constants import CHROOT_PATHS
WRAPPER_PATHS = CHROOT_PATHS | {
'ccache': '/ccache',
'rust': '/rust',
}
class Wrapper(Protocol):
"""Wrappers wrap kupferbootstrap in some form of isolation from the host OS, i.e. docker or chroots"""
@ -63,7 +68,7 @@ class BaseWrapper(Wrapper):
def generate_wrapper_config(
self,
target_path: str = '/tmp/kupferbootstrap',
paths: dict[str, str] = CHROOT_PATHS,
paths: dict[str, str] = WRAPPER_PATHS,
config_overrides: dict[str, dict] = {},
) -> str:
wrapped_config = f'{target_path.rstrip("/")}/{self.identifier}_wrapped.toml'