[Bug 2076395] Re: flash-kernel is not using new kernel with a version string that has more than two "-"
Ubuntu Foundations Team Bug Bot
2076395 at bugs.launchpad.net
Fri Aug 9 16:26:55 UTC 2024
The attachment "oracular-2.debdiff" seems to be a debdiff. The ubuntu-
sponsors team has been subscribed to the bug report so that they can
review and hopefully sponsor the debdiff. If the attachment isn't a
patch, please remove the "patch" flag from the attachment, remove the
"patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe
the team.
[This is an automated message performed by a Launchpad user owned by
~brian-murray, for any issue please contact him.]
--
You received this bug notification because you are a member of Ubuntu
Sponsors, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/2076395
Title:
flash-kernel is not using new kernel with a version string that has
more than two "-"
Status in flash-kernel package in Ubuntu:
In Progress
Bug description:
When we have a testing kernel between releases in following version
string format "6.8.0-1006.2+testing20240708-2-flavor", flash-kernel
fails to detect this newly installed kernel even though it has correct
flavor suffix at the end of version string.
After a bit of skimming in the source code, I found the flavor
detection logic in `include_only_flavors` function:
```
include_only_flavors() {
# include_only_flavors(flav1, flav2, flav3)
# filter lines of input in uname -r format (X.Y.Z-N-flavor)
# and filter-out anything that is not in the listed input
# if the only flavor given is "any", then assume everything is a match
local cur_uname cur_flav allowed_flav
while read cur_uname; do
if [ "$*" = "any" ]; then
echo "$cur_uname"
else
# could use cur_flav=$(get_kfile_suffix "$cur_uname")
# but this is much faster.
cur_flav=${cur_uname#*-*-}
for allowed_flav in "$@"; do
if [ "${cur_flav}" = "${allowed_flav}" ]; then
echo "$cur_uname"
break
fi
done
fi
done
}
```
As you see above, this detection logic has a wrong assumptions about
the version string, but in fact the commented out alternative
`get_kfile_suffix` works with the use cases like we have.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/flash-kernel/+bug/2076395/+subscriptions
More information about the Ubuntu-sponsors
mailing list