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

packrootfs: add cpio installation status check #141

Merged
merged 3 commits into from
Dec 5, 2024
Merged

Conversation

dreamliner787-9
Copy link
Contributor

@dreamliner787-9 dreamliner787-9 commented Dec 4, 2024

The packrootfs script currently lacks a check for whether cpio is installed. Which leads to an insidious bug down the line where errors from unsuccessfully executing cpio does not bubble up from the subshell on line 100. So the script returns 0 and allow other build steps to continue even though the rootfs have not been repackaged correctly with the desired init script and user-level program.

This manifests as the guest booting with the original rootfs instead of the repackaged one.

I've been able to reproduce this bug reliably on bash and zsh.

@Ivan-Velickovic
Copy link
Collaborator

Yes, good spot. The problem is that this script does not have set -e as well, which also would have caught the error.

Can you add that to the script as well?

@Ivan-Velickovic
Copy link
Collaborator

Actually can you put it below the license header?

@Ivan-Velickovic Ivan-Velickovic merged commit d9bf333 into main Dec 5, 2024
6 of 8 checks passed
@Ivan-Velickovic Ivan-Velickovic deleted the packrootfs_fix branch December 5, 2024 00:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants