project-trident / trident-core

Core Packages and system overlay files
http://project-trident.org
BSD 2-Clause "Simplified" License
33 stars 10 forks source link

Use uname -r since the kernel default has changed to 5.7 from 5.4 #103

Closed karlgrose closed 4 years ago

karlgrose commented 4 years ago

https://github.com/project-trident/trident-core/blob/9a9bc6dfa0b9fa0253ee37c5cc83502364396bce/void-files/usr/bin/trident-update#L53

This seems to work better to reflect the currently booted kernel:

linuxver=$(uname -r | cut -d . -f 1-2 | cut -d _ -f 1)

now that the default PT kernel is no longer 5.4 (which, however, is still the package version for the current Void "linux" meta package).

beanpole135 commented 4 years ago

Good catch. The current version routine requires that the "linux" meta-package be installed in order to grab the version, which might no longer be the case now that trident-base is no longer using the "linux" meta-package.

I don't think that using uname is the right approach though either: Since that routine runs after all the updates are performed, you could get into a situation where you are running an older kernel (5.4 for example), but the upgrade just removed the linux5.4 package and installed the linux5.7 package. Since we need to "xbps-reconfigure" an installed package, we need to scan the installed packages and pick one of the linux* packages that may have just been installed.

beanpole135 commented 4 years ago

Ok, this should be fixed now: https://github.com/project-trident/trident-core/commit/587fa71e89243e63d47b346b38640eb28b620120