Is there a way to run just one stage of the build-iso script?
I'm trying to get the GitHub Workflows to build the MX Linux ISO. I'd like to have the GitHub Workflows execute just one stage at a time instead of all of them at once. If there's an error or failure, the troubleshooting is so much easier with the screen output in separate shorter chunks than in one long log file.
To run just Stage 0, I've tried putting in the Input/defaults-* file all_stages='0'. While it can go through all of Stage 0 just fine, the script makes the fatal error of trying to go through Stage 0 a second time, and this leads to exit code 1.
build-iso-mx: executing just one stage
- dolphin_oracle
- Developer
- Posts: 22178
- Joined: Sun Dec 16, 2007 12:17 pm
Re: build-iso-mx: executing just one stage
by default build-iso asks if you want to go to the next stage. it does not have a stop other than that question. if you say no, then it exits. it does present all the errors at this point as well, for that stage.
you can start a stage over. lets say you get to stage 7 (squashfs) but you update the initrd. then you can start over at stage 6 with the -6 key. this is also handy for updating filesystems midstream, but starting over at stage 3 (-3).
once I have all the fatal errors fixed, then I can use the --auto switches to proceed automatically through build stages, and the -n switch to not stop for errors (they are still shown), which takes care of a few things here and there that crop up during build, like stat on a file that doesn't exist anymore or a package that produces a error because its installed in a chroot or not on systemd.
you can start a stage over. lets say you get to stage 7 (squashfs) but you update the initrd. then you can start over at stage 6 with the -6 key. this is also handy for updating filesystems midstream, but starting over at stage 3 (-3).
once I have all the fatal errors fixed, then I can use the --auto switches to proceed automatically through build stages, and the -n switch to not stop for errors (they are still shown), which takes care of a few things here and there that crop up during build, like stat on a file that doesn't exist anymore or a package that produces a error because its installed in a chroot or not on systemd.
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.
-
- Posts: 43
- Joined: Wed Jan 11, 2017 6:55 pm
Re: build-iso-mx: executing just one stage
OK, thanks. It may be that automatic mode might not be suitable for GitHub Workflows, but I'd need to somehow pre-supply the answers to questions. Another possibility is to execute my_exit (for GitHub Workflows mode only) at the end of each stage.dolphin_oracle wrote: Sat Oct 29, 2022 4:40 pm by default build-iso asks if you want to go to the next stage. it does not have a stop other than that question. if you say no, then it exits. it does present all the errors at this point as well, for that stage.
you can start a stage over. lets say you get to stage 7 (squashfs) but you update the initrd. then you can start over at stage 6 with the -6 key. this is also handy for updating filesystems midstream, but starting over at stage 3 (-3).
once I have all the fatal errors fixed, then I can use the --auto switches to proceed automatically through build stages, and the -n switch to not stop for errors (they are still shown), which takes care of a few things here and there that crop up during build, like stat on a file that doesn't exist anymore or a package that produces a error because its installed in a chroot or not on systemd.
Now I understand why "set -eo pipefail" was regressed. Errors are perfectly normal and expected at certain points in the build process.
Re: build-iso-mx: executing just one stage
We can still work to reduce the number of errors, but I think many are unavoidable. I think before perfecting the integration we need to improve a bit the script to not throw errors if it doesn't need to.
-
- Posts: 43
- Joined: Wed Jan 11, 2017 6:55 pm
Re: build-iso-mx: executing just one stage
What does the command "leave_stage notime" mean? I see that it's used at the end of Stage 1, in the chroot process, and when skipping steps.
Re: build-iso-mx: executing just one stage
It's a simple function, it just touch the output_file and returns if any argument is provided, $# in bash represents the number of arguments, so "notime" is just a dummy one because it's just counts how many arguments are passed and if any it returns.jhsu802701 wrote: Sat Oct 29, 2022 11:56 pm What does the command "leave_stage notime" mean? I see that it's used at the end of Stage 1, in the chroot process, and when skipping steps.
Code: Select all
leave_stage() {
touch $output_file
[[ $# -gt 0 ]] && return
_end_timer_ STAGE_TIME "Stage $stage"
check_errors_strict
return 0
}