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

package_manager: fix opensuse detection #11660

Merged
merged 7 commits into from Jul 22, 2022
Merged

package_manager: fix opensuse detection #11660

merged 7 commits into from Jul 22, 2022

Conversation

ericLemanissier
Copy link
Contributor

@ericLemanissier ericLemanissier commented Jul 18, 2022

Changelog: Fix: Improve opensuse detection in tool.system.package_manager.
Docs: omit

For example, on opensuse tumbleweed, the distro name is opensuse-tumbleweed
this re-implements what was done in

if "opensuse" in self.linux_distro or "sles" in self.linux_distro:

  • Refer to the issue that supports this Pull Request.
  • If the issue has missing info, explain the purpose/use case/pain/need that covers this Pull Request.
  • I've read the Contributing guide.
  • I've followed the PEP8 style guides for Python code.
  • I've opened another PR in the Conan docs repo to the develop branch, documenting this one.

Note: By default this PR will skip the slower tests and will use a limited set of python versions. Check here how to increase the testing level by writing some tags in the current PR body text.

@ericLemanissier
Copy link
Contributor Author

cf #3368

@memsharded memsharded added this to the 1.51 milestone Jul 18, 2022
@czoido
Copy link
Contributor

czoido commented Jul 18, 2022

Hi @ericLemanissier,
Thanks for the contribution, I have to make some changes so that the code is coherent with the rest of distro -> package manager relation and also I'll add a test.

@@ -37,7 +37,7 @@ def get_default_tool(self):
"brew": ["Darwin"],
"pacman": ["arch", "manjaro", "msys2"],
"choco": ["Windows"],
"zypper": ["opensuse", "sles"],
"zypper": ["opensuse", "sles", "opensuse-tumbleweed"],
Copy link
Contributor

@czoido czoido Jul 18, 2022

Choose a reason for hiding this comment

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

adding "opensuse-tumbleweed" as the distro related to zypper should solve the issue

Copy link
Contributor Author

Choose a reason for hiding this comment

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

#3368 mentions opensuse-leap, and I have no idea what are the names for sles. This is why I chose to keep the behaviour of conans/client/tools/oss.py

Copy link
Contributor

Choose a reason for hiding this comment

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

ok, I see, we can do some mix of both, and also test opensuse-leap and make sure that in the future if one distro returns opensuse-newversion it will not break...

@czoido czoido requested a review from memsharded July 19, 2022 09:49
@czoido czoido merged commit 3176f40 into conan-io:develop Jul 22, 2022
@ericLemanissier ericLemanissier deleted the patch-1 branch July 22, 2022 09:41
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.

None yet

3 participants