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

libkrun: avoid failing when libkrunfw is missing #283

Merged
merged 1 commit into from
Mar 21, 2025

Conversation

slp
Copy link
Contributor

@slp slp commented Mar 21, 2025

In the last iteration of PR#256 we introduced the use of LazyLock, which helps us load the library earlier. The implementation was wronging because we were unwrapping if the library is missing, which is exactly what we were trying to prevent.

Replace the value with an Option, which allows us to avoid the unwrap and actually achieves the purpose of making libkrunfw optional.

In the last iteration of PR#256 we introduced the use of LazyLock,
which helps us load the library earlier. The implementation was
wronging because we were unwrapping if the library is missing,
which is exactly what we were trying to prevent.

Replace the value with an Option, which allows us to avoid the
unwrap and actually achieves the purpose of making libkrunfw
optional.

Signed-off-by: Sergio Lopez <[email protected]>
Copy link
Member

@tylerfanelli tylerfanelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@tylerfanelli
Copy link
Member

Probably should have tested with a missing libkrunfw :) my mistake

@slp slp merged commit 5a90309 into containers:main Mar 21, 2025
5 checks passed
@slp slp deleted the fix-missing-libkrunfw branch March 21, 2025 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants