craft_parts.overlays.chroot module¶
Execute a callable in a chroot environment.
- craft_parts.overlays.chroot.chroot(path, target, *args, **kwargs)[source]¶
Execute a callable in a chroot environment.
- Parameters:
path (
Path) – The new filesystem root.target (
Callable[...,TypeVar(_T)]) – The callable to run in the chroot environment.args (
Any) – Arguments for target.kwargs (
Any) – Keyword arguments for target.
- Return type:
TypeVar(_T)- Returns:
The target function return value.