]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Mount staging directory into build script
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 20 Jun 2023 15:24:12 +0000 (17:24 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 20 Jun 2023 15:24:12 +0000 (17:24 +0200)
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.

mkosi/__init__.py

index eefa8791e640bb3869d49610dbbf0529efc2f687..23008cd0647493840231770716cf62f52864f2a2 100644 (file)
@@ -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: