Commit 281dd55
committed
kernel_build: Use HEAD commit too when selecting the default kernel
In order to boot the kernel that has just been installed, the script tries
to find the kernel that matches the BRANCH name in the grub configuration.
But if there are multiple matches, the last kernel that matches is the one
selected as default version. This happens very often as CVE fixes are done
in the same branch for the same person. For example, these 2 kernel
match the BRANCH={rnicolescu}_fips-9-compliant/5.14.0-284.30.1:
kernel="/boot/vmlinuz-5.14.0-rnicolescu_fips-9-compliant_5.14.0-284.30.1-94a90a71b+"
kernel="/boot/vmlinuz-5.14.0-rnicolescu_fips-9-compliant_5.14.0-284.30.1-9ee6109a0+"
But the last one is the one that set as default, even though, the HEAD
commit is 94a90a71b.
Fix this by matching against LOCALVERSION which takes the HEAD commit hash
into account.
Signed-off-by: Roxana Nicolescu <rnicolescu@ciq.com>1 parent 0f5d826 commit 281dd55
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
143 | | - | |
144 | | - | |
| 143 | + | |
| 144 | + | |
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
| |||
0 commit comments