Restore anaconda-iso/iso type to bootc-image-builder - #2527
Conversation
This will allow bootc-image-builder to use it to retrieve the distro specific packages needed for the anaconda-iso. Related: HMS-10969
This copies over the legacy_iso.go code from bib to cmd/image-builder/bib_legacy.go and adjusts it to work with image-builder. The largest change is using NewYAMLDistroYAMLFrom to load the anaconda rpm packages. The distro of the bootc container is used to lookup the image-builder distro yaml and the rpm packages from the 'bootc-rpm-installer' section are installed. Related: HMS-10969
Hook up the legacy anaconda iso code to the bootc-image-builder call path. This is selected by using --type=anaconda-iso or --type=iso Related: HMS-10969
f20bb9c to
73061c1
Compare
Related: HMS-10969
|
I'm confused why this was removed in the first place; it definitely wasn't supposed to be 🙂, did something go wrong during the merge/previous import? cc @achilleas-k. |
I don't know for certain. I discovered it wasn't working as expected when I enabled the BIB tests here. It's possible we never tested it with bootc-image-builder built from the image-builder-cli repo. |
achilleas-k
left a comment
There was a problem hiding this comment.
LGTM!
Thanks for taking care of this on short notice. A comment below for a follow-up, but good to merge.
| // The anaconda-iso code is different enough for a separate function | ||
| if imgTypeStr == "anaconda-iso" || imgTypeStr == "iso" { | ||
| return manifestFromCobraForLegacyISO(imgref, buildImgref, imgTypeStr, rootFs, rpmCacheRoot, config, useLibrepo, cntArch) | ||
| } |
There was a problem hiding this comment.
I like that this is separated completely from every other image type. Makes it easier to work with this specific image type, which is very different from the rest, without needing to think about potential interactions with anything else.
There was a problem hiding this comment.
It looks like this file contains functions that were already copied over and distributed to other files. But I'm fine with merging this as is and cleaning up after. Now that we have the ISO tests passing, we can much refactor things safely. I'd like for the refactoring to happen soon though, to minimise the chance that we start making changes, fixing bugs, and causing confusion and drift between the duplicate functions.
It was removed, but is still used by some, so this adds the missing code and adjusts it to work with the current image-builder
Related: HMS-10969