diff --git a/mkosi/__init__.py b/mkosi/__init__.py index 513d0f29b..09d7cb67a 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -706,9 +706,6 @@ def run_prepare_scripts(context: Context, build: bool) -> None: if context.config.profiles: env["PROFILES"] = " ".join(context.config.profiles) - if context.config.build_dir is not None: - env |= dict(BUILDDIR="/work/build") - env |= context.config.environment with ( @@ -730,11 +727,6 @@ def run_prepare_scripts(context: Context, build: bool) -> None: "--ro-bind", json, "/work/config.json", "--bind", context.artifacts, "/work/artifacts", "--bind", context.package_dir, "/work/packages", - *( - ["--ro-bind", str(context.config.build_dir), "/work/build"] - if context.config.build_dir - else [] - ), *sources, ] # fmt: skip diff --git a/mkosi/resources/man/mkosi.1.md b/mkosi/resources/man/mkosi.1.md index 0ce926176..069787a5a 100644 --- a/mkosi/resources/man/mkosi.1.md +++ b/mkosi/resources/man/mkosi.1.md @@ -2404,7 +2404,7 @@ Consult this table for which script receives which environment variables: | `CHROOT_SCRIPT` | | | ✓ | ✓ | ✓ | ✓ | | | | `SRCDIR` | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | | `CHROOT_SRCDIR` | | | ✓ | ✓ | ✓ | ✓ | | | -| `BUILDDIR` | | | ✓ | ✓ | ✓ | ✓ | | | +| `BUILDDIR` | | | | ✓ | ✓ | ✓ | | | | `CHROOT_BUILDDIR` | | | | ✓ | | | | | | `DESTDIR` | | | | ✓ | | | | | | `CHROOT_DESTDIR` | | | | ✓ | | | | | diff --git a/mkosi/resources/man/mkosi.news.7.md b/mkosi/resources/man/mkosi.news.7.md index 7a00fef0e..133fc6c99 100644 --- a/mkosi/resources/man/mkosi.news.7.md +++ b/mkosi/resources/man/mkosi.news.7.md @@ -6,6 +6,10 @@ ## v25 +- `BuildDirectory=` is no longer available in `PrepareScripts=`. If you + need to acquire some files for the build process place them somewhere + sensible within `$BUILDROOT` so that they can be cached when building + incrementally. - Instead of using bubblewrap, sandboxing is now done with a new tool `mkosi-sandbox`. This tool has a public API and can be used independently of mkosi.