rnestler / reboot-arch-btw

Checks if your ArchLinux needs a reboot due to a kernel update
GNU General Public License v3.0
25 stars 4 forks source link

Print cleaned kernel version #160

Closed rnestler closed 8 months ago

rnestler commented 8 months ago

It confused me that it showed the following with kernel 6.7:

Kernel
 installed: 6.7.arch3-1 (since 4 days ago)
 running:   6.7.0.arch3.1
systemd updated 14 minutes ago
Reboot arch btw

Note that we should reboot because of the systemd update, but since the kernel versions look different I thought it was due to a bug in version comparison.

Since we actually use a cleaned up version to compare the running kernel we can also show it:

Kernel
 installed: 6.7.0.arch3.1 (since 4 days ago)
 running:   6.7.0.arch3.1
systemd updated 16 minutes ago
Reboot arch btw

Makes it much clearer that the versions are the same. If we want to see the raw versions before cleanup, we can enable INFO logging:

[2024-01-20T17:07:35Z INFO  reboot_arch_btw::kernel] uname -r output: 6.7.0-arch3-1
[2024-01-20T17:07:35Z INFO  reboot_arch_btw::kernel] Detected kernel package: linux
[2024-01-20T17:07:35Z INFO  reboot_arch_btw::kernel] kernel package version: 6.7.arch3-1
Kernel
 installed: 6.7.0.arch3.1 (since 4 days ago)
 running:   6.7.0.arch3.1
[2024-01-20T17:07:35Z INFO  reboot_arch_btw::critical_packages_check] Checking systemd
systemd updated 16 minutes ago
Reboot arch btw