Skip to content

TOOL-27512 LTS 24.04: Stop using HWE kernels when fetching kernel versions #336

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

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions lib/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1113,21 +1113,13 @@ function get_kernel_version_for_platform_from_apt() {
# image for that particular platform. For instance, Ubuntu has a
# meta-package for AWS called 'linux-image-aws', which depends on
# package 'linux-image-4.15.0-1027-aws'. The latter is the linux image
# for kernel version '4.15.0-1027-aws'. We use this depenency to figure
# for kernel version '4.15.0-1027-aws'. We use this dependency to figure
# out the default kernel version for a given platform.
#
# The "generic" platform is a special case, since we want to use the
# hwe kernel image instead of the regular generic image.
#
# Note that while the default kernel is usually also the latest
# available, it is not always the case.
#

if [[ "$platform" != generic ]] && [[ "$UBUNTU_DISTRIBUTION" == noble ]]; then
package="linux-image-${platform}"
else
package="linux-image-${platform}-hwe-24.04"
fi
package="linux-image-${platform}"

if [[ "$(apt-cache show --no-all-versions "$package" \
2>/dev/null | grep Depends)" =~ linux-image-([^,]*-${platform}) ]]; then
Expand Down