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

[feature] tools.system.package_manager:sudo=True skip if sudo not installed #16264

Closed
1 task done
rconde01 opened this issue May 15, 2024 · 3 comments
Closed
1 task done
Assignees

Comments

@rconde01
Copy link

What is your suggestion?

I ran into the case where I set sudo to be true, but for msys sudo is not installed so it leads to an error. Maybe it's reasonable to skip it in this case...

Have you read the CONTRIBUTING guide?

  • I've read the CONTRIBUTING guide
@rconde01
Copy link
Author

I worked around it by just creating a passthough script /usr/bin/sudo with just "$@"

@memsharded memsharded self-assigned this May 20, 2024
@memsharded
Copy link
Member

Thanks for the suggestion @rconde01

We'd prefer not to do this, in our experience this ends being problematic. In general in Conan we try to detect as little as possible and rely on explicit definitions. If the conf ....:sudo=True is defined, it must add sudo. Because if Conan tries to be smart, detect if sudo is there it will eventually find some cases that it fails to detect sudo, omit it, and it will result not only in a failure, but most importantly, in a blocker. Users will not be able to move forward until that specific detection bug is fixed in one of the following releases.

So we think that it is the responsibility of the profile to decide/know if there is sudo or not in that platform and if it should be used to install system packages.

@rconde01
Copy link
Author

Totally fair...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants