Skip to content
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

fix OS detection for Alpine Linux #1545

Merged
merged 2 commits into from
Feb 16, 2024
Merged

fix OS detection for Alpine Linux #1545

merged 2 commits into from
Feb 16, 2024

Conversation

BurntSushi
Copy link
Member

This PR fixes the OS detection for Alpine Linux such that the version
of musl available is correctly determined. The issue boiled down to
a regex that required 2 digits for each version component. But a
valid musl version is 1.2.4, which only has a single digit for each
component.

It's unclear how this was working for musl before this change. My
theory is that our other methods of OS detection were somehow working.

The first commit in this PR cleans up our Linux detection logic and adds
lots of tracing calls to make debugging issues like this easier in the
future. To do so, one can run:

$ RUST_LOG=trace uv pip install -v whatever

The second commit has the actual fix.

Fixes #1427

We make the names and return types a little more consistent. We also add
a lot more tracing calls to make issues with OS version detection easier
to diagnose.

It is not intended for any behavior changes to be in this commit.

Ref #1427
I'm not quite sure how this was every working before. It's possible
it has never worked, but that our other methods of OS detection were
working.

In any case, empirically, it seems that the version number components
for musl can be a single digit.

Fixes #1427
@BurntSushi BurntSushi merged commit 3aa7a6b into main Feb 16, 2024
@BurntSushi BurntSushi deleted the ag/fix-i1427 branch February 16, 2024 21:37
@BurntSushi BurntSushi added the bug Something isn't working label Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failed to detect operating system version on Alpine Linux
2 participants