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
opensuse SystemPackageTools incorrectly using apt-get when zypper-aptitude #8747
opensuse SystemPackageTools incorrectly using apt-get when zypper-aptitude #8747
Conversation
to be honest, I don't think it should be fixed that way. IMO, functions like |
Apt is installed and working in OpenSuse. But it happens it is just a wrapper about zypper, so if you report that apt-get is there, the installation of packages will fail, because those packages do not exist in Suse repos. How do you want to address this issue then? |
not sure I get, why it will fail if |
Recipes and SystemPackageTool uses different names for different systems: if tools.os_info.is_linux and self.settings.os == "Linux":
if tools.os_info.with_yum:
if tools.os_info.linux_distro == "fedora" and tools.os_info.os_version >= "32":
packages = ["libglvnd-devel"]
else:
packages = ["mesa-libGL-devel"]
elif tools.os_info.with_apt:
ubuntu_20_or_later = tools.os_info.linux_distro == "ubuntu" and tools.os_info.os_version >= "20"
debian_11_or_later = tools.os_info.linux_distro == "debian" and tools.os_info.os_version >= "11"
pop_os_20_or_later = tools.os_info.linux_distro == "pop" and tools.os_info.os_version >= "20"
if ubuntu_20_or_later or debian_11_or_later or pop_os_20_or_later:
packages = ["libgl-dev"]
else:
packages = ["libgl1-mesa-dev"]
elif tools.os_info.with_pacman:
packages = ["libglvnd"] The problem here is OpenSuse reporting that it has apt, the |
yes, for me it seems to be a recipe problem. package manager vs distro are a bit orthogonal categories, and conditions should be fixed there. |
I don't think so. How having our own What would be the fix you would propose to the recipe that would make sense? |
Right now to check if For OpenSuse with zypper-aptitude installed the return string is:
For example, for Ubuntu focal:
|
Ok, that could be a different way, but the key here is to agree if |
From my point of view it should return |
totally agree |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
output = check_output_runner([apt_location, 'moo'])
should be changed to:
output = check_output_runner([apt_location, '--version'])
because the output of zypper moo
does not contain the string zypper.
Oh, right, this is unfortunate, if we are changing this, then there is some risk of breaking. I guess we should look for the |
I think it should be fine keeping the check that
and calling
Looks like in the original PR there was not special reason to check the existence of apt-get with |
there was the valid reason - checking |
Oh, I see... Maybe we could check both |
Too much to check for both Furthermore, as design rules for Conan codebase:
|
Changelog: Bugfix: Fix opensuse SystemPackageTools incorrectly using apt-get when zypper-aptitude.
Docs: Omit
Fix #8737