-
Notifications
You must be signed in to change notification settings - Fork 357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect Linux version regex [linux version not found (virtual package skipped)]
#1851
Comments
A PR would be very welcome! |
Sure! Will have a PR ready later today |
regex seems to work according to regex101.com :) |
Micromamba-docker isssue 227 seems to indicate the updated regex is still failing to match on some linux distributions. |
Yeah, I jumped the gun on the regex. I tried it in https://regex101.com/ but forget to remove the |
The call to |
interesting, thanks for helping out with the debugging! |
The regex on line 301 in
libmamba/src/core/util_os.cpp
is incorrect for detecting Linux versions.The current regex is
([0-9]+\.[0-9]+\.[0-9]+)-.*
and expects the Linux kernel version to end with-kernel-flavour
. Ex.5.15.59-27-generic
. Not all kernel versions end with a flavour tag however. On NixOS the kernel versions are simply5.15.59
, meaning the current regex fails matching. This leads to thelinux version not found (virtual package skipped)
warning on certain distros.A fix would be using a regex such as
([0-9]+\.[0-9]+\.[0-9]+)(?:-.*)?
or^([0-9]+\.[0-9]+\.[0-9]+)(?:-.*)?$
.Outputs
The text was updated successfully, but these errors were encountered: