From: Daan De Meyer Date: Tue, 20 Jun 2023 15:24:12 +0000 (+0200) Subject: Mount staging directory into build script X-Git-Tag: v15~108^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8666c1b549da9cb1ba09aa79d71f7fadf4d3d408;p=thirdparty%2Fmkosi.git Mount staging directory into build script The build script might produce additional outputs, so let's allow the user to funnel those out of the container by mounting the staging directory and setting the OUTPUTDIR environment variable. --- diff --git a/mkosi/__init__.py b/mkosi/__init__.py index eefa8791e..23008cd06 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -1795,6 +1795,7 @@ def run_build_script(state: MkosiState) -> None: "--bind", state.config.build_sources, "/work/src", "--bind", state.config.build_script, "/work/build-script", "--bind", state.install_dir, "/work/dest", + "--bind", state.staging, "/work/out", "--chdir", "/work/src", ] @@ -1804,6 +1805,7 @@ def run_build_script(state: MkosiState) -> None: WITH_NETWORK=one_zero(state.config.with_network), SRCDIR="/work/src", DESTDIR="/work/dest", + OUTPUTDIR="/work/out", ) if state.config.build_dir is not None: