if not (conf := context.repository / "conf/distributions").exists():
conf.parent.mkdir(exist_ok=True)
- conf.write_text(
- textwrap.dedent(
- f"""\
- Origin: mkosi
- Label: mkosi
- Architectures: {context.config.distribution.architecture(context.config.architecture)}
- Codename: mkosi
- Components: main
- Description: mkosi local repository
- """
- )
+ distconfig = textwrap.dedent(
+ f"""\
+ Origin: mkosi
+ Label: mkosi
+ Architectures: {context.config.distribution.architecture(context.config.architecture)}
+ Codename: mkosi
+ Components: main
+ Description: mkosi local repository
+ """
)
+ for distconfinclude in ("usr/lib/reprepro/", "etc/reprepro/"):
+ if (context.sandbox_tree / distconfinclude).exists():
+ distconfig += f"!include: /{distconfinclude}\n"
+ conf.write_text(distconfig)
run(
[
running scripts. If the `mkosi.packages/` directory is found in the local
directory it is also used for this purpose.
+ On deb-based distributions the local repository will be created with **reprepro** and additional
+ configuration for reprepro will be included from `/usr/lib/reprepro` and `/etc/reprepro` in the sandbox
+ trees, see **reprepro(1)** for details on reprepro configuration includes.
+
`VolatilePackageDirectories=`, `--volatile-package-directory=`
: Like `PackageDirectories=`, but any changes to the packages in these
directories will not invalidate the cached images if `Incremental=`