Fix installation of OEM kernel when installing Ubuntu offline on a certified device#2230
Merged
Merged
Conversation
This reverts commit 081dc12. In the above commit, we tried to fix the name of the OEM kernel package stored in the kernel model. We figured that "linux-oem-somerville-treckoo-meta-24.04" is not a real package name and replaced it with "oem-somerville-treckoo-meta". The latter does exist, however, this is still wrong because it isn't a kernel metapackage, it is an OEM metapackage. LP: #2114780 Signed-off-by: Olivier Gayot <[email protected]>
dbungert
approved these changes
Jun 20, 2025
| kernel_model = self.app.base_model.kernel | ||
| kernel_model.metapkg_name_override = pkg.name | ||
| kernel_model.metapkg_name_override = flavor_to_pkgname( | ||
| "oem", dry_run=self.app.opts.dry_run |
Member
There was a problem hiding this comment.
The OEM kernel install is quite confusing. We had to talk about this line quite a lot to be able to explain it. Would you elaborate on the expected behavior in a comment?
Member
Author
There was a problem hiding this comment.
Thanks! Added a comment and updated the log line a few lines down.
226952c to
2922b0b
Compare
On certified devices, when we are offline and the OEM metapackage declares that it should be used with the OEM kernel (i.e., Ubuntu-Oem-Kernel-Flavour: oem), we store the name of the kernel package to install in the kernel model. However, the flavor_to_pkgname() function was used incorrectly. We were meant to give it the name of a flavor (e.g., oem, generic, ...) but instead we gave it the name of the OEM metapackage. As a consequence, we ended up trying to install kernel package with names such as "linux-oem-somerville-treckoo-meta-24.04". Instead it should have been "linux-oem-24.04". LP: #2114780 Signed-off-by: Olivier Gayot <[email protected]>
2922b0b to
0c99776
Compare
dbungert
approved these changes
Jun 23, 2025
Chris-Peterson444
approved these changes
Jun 23, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
On certified devices, when we are offline and the OEM metapackage declares that it should be used with the OEM kernel (i.e., Ubuntu-Oem-Kernel-Flavour: oem), we store the name of the kernel package to install in the kernel model.
However, the flavor_to_pkgname() function was used incorrectly. We were meant to give it the name of a flavor (e.g., oem, generic, ...) but instead we gave it the name of the OEM metapackage.
As a consequence, we ended up trying to install kernel package with names such as "linux-oem-somerville-trecko-meta-24.04". Instead it should have been "linux-oem-24.04".
Later in #2034, we attempted to fix the issue by setting the kernel package name to "oem-somerville-treecko-meta". But "oem-somerville-treecko-meta" is not the name of a kernel metapackage, it is the name of the OEM metapackage.
LP:#2114780