The running kernel, …112.5.1, is the newest of the three installed (207.111.5.6, 208.112.5, 208.112.5.1). The host was rebooted at about 09:00 on 2026-11-12, and a reboot does not clear the warning.
Cause
_version_key in host_status.py splits a version into digit runs and the text between them. Python then compares the text parts as plain strings:
'.el' > '.', so kernel_reboot_pending takes 112.5 to be newer. rpm's own comparison (rpmvercmp) sees it the other way round: after 5 comes 1 on one side and el on the other, and a numeric segment beats an alpha segment, so 112.5.1 is newer.
Reproduce:
kernel_reboot_pending("6.12.0-208.112.5.1.el9uek.aarch64",["6.12.0-208.112.5.el9uek.aarch64","6.12.0-208.112.5.1.el9uek.aarch64"],)# returns 6.12.0-208.112.5.el9uek.aarch64; should be None
Fix direction
Compare segments the way rpmvercmp does: separators carry no weight, a numeric segment is newer than an alpha one, and when one version runs out of segments it is the older. Debian's kernels (6.8.0-142-generic) keep their order under this rule.
## What happens
build-arm-01 (Oracle Linux 9.8) reports `reboot_required` with this reason:
> kernel 6.12.0-208.112.5.el9uek.aarch64 installed, 6.12.0-208.112.5.1.el9uek.aarch64 running
The running kernel, `…112.5.1`, is the newest of the three installed (`207.111.5.6`, `208.112.5`, `208.112.5.1`). The host was rebooted at about 09:00 on 2026-11-12, and a reboot does not clear the warning.
## Cause
`_version_key` in `host_status.py` splits a version into digit runs and the text between them. Python then compares the text parts as plain strings:
```
6.12.0-208.112.5.el9uek -> (..., 112, '.', 5, '.el', 9, 'uek')
6.12.0-208.112.5.1.el9uek -> (..., 112, '.', 5, '.', 1, '.el', 9, 'uek')
```
`'.el' > '.'`, so `kernel_reboot_pending` takes `112.5` to be newer. rpm's own comparison (`rpmvercmp`) sees it the other way round: after `5` comes `1` on one side and `el` on the other, and a numeric segment beats an alpha segment, so `112.5.1` is newer.
Reproduce:
```python
kernel_reboot_pending(
"6.12.0-208.112.5.1.el9uek.aarch64",
["6.12.0-208.112.5.el9uek.aarch64", "6.12.0-208.112.5.1.el9uek.aarch64"],
) # returns 6.12.0-208.112.5.el9uek.aarch64; should be None
```
## Fix direction
Compare segments the way rpmvercmp does: separators carry no weight, a numeric segment is newer than an alpha one, and when one version runs out of segments it is the older. Debian's kernels (`6.8.0-142-generic`) keep their order under this rule.
Found while fixing #107.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
What happens
build-arm-01 (Oracle Linux 9.8) reports
reboot_requiredwith this reason:The running kernel,
…112.5.1, is the newest of the three installed (207.111.5.6,208.112.5,208.112.5.1). The host was rebooted at about 09:00 on 2026-11-12, and a reboot does not clear the warning.Cause
_version_keyinhost_status.pysplits a version into digit runs and the text between them. Python then compares the text parts as plain strings:'.el' > '.', sokernel_reboot_pendingtakes112.5to be newer. rpm's own comparison (rpmvercmp) sees it the other way round: after5comes1on one side andelon the other, and a numeric segment beats an alpha segment, so112.5.1is newer.Reproduce:
Fix direction
Compare segments the way rpmvercmp does: separators carry no weight, a numeric segment is newer than an alpha one, and when one version runs out of segments it is the older. Debian's kernels (
6.8.0-142-generic) keep their order under this rule.Found while fixing #107.