mkosi: Copy packages to the build directory as well
With the latest mkosi, mkosi -t none can be used to rerun the build script without messing with a previously built image. This allows one to run "mkosi -t disk -f qemu" in one terminal to build and boot an image in qemu and then run "mkosi -t none" in another terminal to rebuild the packages. If one then has "RuntimeBuildSources=yes" set in their mkosi configuration, the build directory is mounted into the virtual machine, which means that one can then run "dnf upgrade /work/build/*.rpm" from within the VM to install the new packages. This allows for quickly iterating on changes without having to rebuild the image all the time. We'll probably want to document this at some point, but let's start with making it possible by copying the built packages to the build directory.
This commit is contained in:
@@ -91,3 +91,4 @@ env --chdir="pkg/$ID" \
|
||||
MESON_EXTRA_CONFIGURE_OPTIONS="$MKOSI_MESON_OPTIONS $MESON_OPTIONS"
|
||||
|
||||
cp "$OUTPUTDIR"/*.pkg.tar "$PACKAGEDIR"
|
||||
cp "$OUTPUTDIR"/*.pkg.tar "$BUILDDIR"
|
||||
|
||||
@@ -114,3 +114,4 @@ CXX_LD="$( ((LLVM)) && echo lld)" \
|
||||
"pkg/$ID/systemd.spec"
|
||||
|
||||
cp "$OUTPUTDIR"/*.rpm "$PACKAGEDIR"
|
||||
cp "$OUTPUTDIR"/*.rpm "$BUILDDIR"
|
||||
|
||||
@@ -139,4 +139,5 @@ fi
|
||||
shopt -s nullglob
|
||||
cp ../*.deb ../*.ddeb "$PACKAGEDIR"
|
||||
cp ../*.deb ../*.ddeb "$OUTPUTDIR"
|
||||
cp ../*.deb ../*.ddeb "$BUILDDIR"
|
||||
)
|
||||
|
||||
@@ -133,3 +133,4 @@ if ! build; then
|
||||
fi
|
||||
|
||||
cp "$OUTPUTDIR"/*.rpm "$PACKAGEDIR"
|
||||
cp "$OUTPUTDIR"/*.rpm "$BUILDDIR"
|
||||
|
||||
Reference in New Issue
Block a user