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: handle linux mint #15026

Merged
merged 3 commits into from
Oct 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion conan/tools/system/package_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def get_default_tool(self):
os_name = distro.id() or os_name
elif os_name == "Windows" and self._conanfile.conf.get("tools.microsoft.bash:subsystem") == "msys2":
os_name = "msys2"
manager_mapping = {"apt-get": ["Linux", "ubuntu", "debian", "raspbian"],
manager_mapping = {"apt-get": ["Linux", "ubuntu", "debian", "raspbian", "linuxmint"],
"apk": ["alpine"],
"yum": ["pidora", "scientific", "xenserver", "amazon", "oracle", "amzn",
"almalinux", "rocky"],
Expand All @@ -61,6 +61,11 @@ def get_default_tool(self):
for d in distros:
if d in os_name:
return tool

# No default package manager was found for the system,
# so notify the user
self._conanfile.output.info("A default system package manager couldn't be found for {}, "
"system packages will not be installed.".format(os_name))

def get_package_name(self, package, host_package=True):
# Only if the package is for building, for example a library,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def test_msys2():
@pytest.mark.parametrize("distro, tool", [
("ubuntu", "apt-get"),
("debian", "apt-get"),
("linuxmint", "apt-get"),
("pidora", "yum"),
("rocky", "yum"),
("fedora", "dnf"),
Expand Down