Flatcar
Flatcar copied to clipboard
Changing the bootengine package repository commit does not lead to building a new initrd in the same dev environment
Hello,
Context:
Flatcar initrd creation is defined by the rules / binaries from this repository: https://github.com/flatcar/bootengine The link between flatcar/scripts and the flatcar/bootengine repos is done via the repo/commit id in this file: https://github.com/flatcar/scripts/blob/main/sdk_container/src/third_party/coreos-overlay/sys-kernel/bootengine/bootengine-9999.ebuild#L13
I am trying to test / debug a new initrd for Flatcar but I cannot use emerge-amd64-usr command to rebuild a new initrd in the same test env, as I need a clean environment each time I change the bootengine commit id. If I use emerge-amd64-usr, the initrd is not created with the new changes from bootengine. Which leads to 2 hours+ of development time instead of a few minutes for each initrd change.
Workflow to reproduce the issue:
- Create a new environment and build packages + build image + boot the image using qemu-kvm bash wrapper. All works as expected.
- Change the commit id of bootengine and rebuild affected packages + build image + boot the image using qemu-kvm bash wrapper. The initrd does not contain the changes from the new bootengine commit id.
Example of changing the bootengine commit id: https://github.com/flatcar/scripts/pull/1684/commits/cfdeb5b8775a01e0a06cf1cb9dc3aa690766a2ec Affected packages rebuild:
emerge-amd64-usr sys-kernel/bootengine
emerge-amd64-usr sys-kernel/coreos-kernel
emerge-amd64-usr sys-kernel/bootengine
logs show that new bootengine repo was properly propagated and checked out.
emerge-amd64-usr sys-kernel/coreos-kernel
logs show that the bootengine repo was being used to run the update-bootengine.
But the initrd does not contain the correct changes, it's like the generation is using some cached version from the initial build_packages
.
Is there something I am missing in the workflow? Would be nice to have a documented workflow too, I ll open a docs PR once I solve this issue.
Thank you.