Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce --run-build-scripts (-R) to always run build scripts #3555

Merged
merged 9 commits into from
Feb 26, 2025

Conversation

DaanDeMeyer
Copy link
Contributor

@DaanDeMeyer DaanDeMeyer commented Feb 26, 2025

Currently we run "mkosi -t none" in systemd and mkosi-kernel to run
the build script(s) without rebuilding the entire image. Using the
"none" output format for this purpose is a hack. It also breaks when
using History=yes as running mkosi -t none will change the output
format in the history after which running mkosi qemu will fail saying
it can't boot the "none" output format.

Let's introduce a --run-build-scripts argument which will make us always
run the build scripts regardless of whether the image has already been
built or not. At the same time, remove various behaviors from the "none"
format that were solely added to enable the hack of using it to run build
scripts without rebuilding the image:

  • Clean up outputs from the previous build when the "none" output format
    is used

Preparation for the upcoming commit where we'll need all the images
instead of just the main one when reading the history.
The none output format generates no outputs so there's no need to
call finalize_staging().
@DaanDeMeyer DaanDeMeyer force-pushed the history branch 5 times, most recently from 88388d2 to 0aa1dd1 Compare February 26, 2025 12:05
@DaanDeMeyer DaanDeMeyer force-pushed the history branch 2 times, most recently from 0bde66a to 0de6972 Compare February 26, 2025 12:51
Currently we run "mkosi -t none" in systemd and mkosi-kernel to run
the build script(s) without rebuilding the entire image. Using the
"none" output format for this purpose is a hack. It also breaks when
using History=yes as running mkosi -t none will change the output
format in the history after which running mkosi qemu will fail saying
it can't boot the "none" output format.

Let's introduce a --run-build-scripts argument which will make us always
run the build scripts regardless of whether the image has already been
built or not. At the same time, remove various behaviors from the "none"
format that were solely added to enable the hack of using it to run build
scripts without rebuilding the image:

- Clean up outputs from the previous build when the "none" output format
  is used
@DaanDeMeyer DaanDeMeyer merged commit 6e64559 into systemd:main Feb 26, 2025
33 of 35 checks passed
@DaanDeMeyer DaanDeMeyer deleted the history branch February 26, 2025 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants