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

Over-optimized for happy path in "Probe failed for libncurses5-dev" warning. #522

Closed
03juan opened this issue May 6, 2024 · 1 comment · Fixed by #523
Closed

Over-optimized for happy path in "Probe failed for libncurses5-dev" warning. #522

03juan opened this issue May 6, 2024 · 1 comment · Fixed by #523

Comments

@03juan
Copy link
Contributor

03juan commented May 6, 2024

Is your feature request related to a problem?

I think I overoptimized PR #521 for #518, the real intent of the warning ends up looking messy for users:

image

Describe the feature you'd like

I'd like to give the fix another go with a more sophisticated approach that tests for either package, and then warns if none are found by favoring libncurses-dev.

My proposal is to include both libraries individually in common_debian_pkgs and then extend the probe loop by special-casing the *ncurses* package tests, only warn if none are found, and ensure this works for all os releases, not just deb-based.

Describe alternatives you've considered

I've tried to use expansion to test for either package, which works in a bash/zsh shell:

image

But not in sh:

image

Additional context

This will then encourage users to favor the "new" package, but not complain if the system only has "5" installed.

@paulo-ferraz-oliveira
Copy link
Contributor

I don't think that we should complicate the probing mechanism more than it is. It's a rather "best effort" thing.

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 a pull request may close this issue.

2 participants