mirror of
https://github.com/truenas/scale-build.git
synced 2026-02-21 18:26:37 +00:00
14 lines
412 B
Python
14 lines
412 B
Python
import os
|
|
|
|
from scale_build.utils.environment import APT_ENV
|
|
from scale_build.utils.run import run
|
|
from scale_build.utils.paths import CHROOT_BASEDIR
|
|
|
|
PACKAGE_PATH = os.path.join(CHROOT_BASEDIR, 'packages')
|
|
|
|
|
|
def run_in_chroot(command, exception_message=None, **kwargs):
|
|
return run(
|
|
['chroot', CHROOT_BASEDIR] + command, exception_msg=exception_message, env={**APT_ENV, **os.environ}, **kwargs
|
|
)
|