mkimage-iso-efi should always build for architecture of its tar input stream #4667
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously, mkimage-iso-efi would take the tar as is, but insert initrd for its local platform, which made no sense. An earlier commit in #4665 fixed it so you could specify TARGETARCH. Thus, if running on am64 and your tar is arm64, you could force it to build for arm64 via TARGETARCH=arm64. That works, but even that is too complex.
There is no reason ever to build the initrd for anything other than the architecture of the input tar stream. Rather than trying to use local arch, or have the user signal it with an env var, this just takes the arch of the tar stream and uses it.
mkimage-iso-efi always will build the initrd for the architecture of the input stream. Much cleaner and simpler.
Kudos to @rene , who thought of this nice one.