From dd0554839fd7fa9a719036940c2fca0143be7ea0 Mon Sep 17 00:00:00 2001 From: David Sanchez Date: Mon, 21 Jul 2025 18:02:33 +0200 Subject: [PATCH 1/4] how to install system package with version added --- reference/tools/system/package_manager.rst | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/reference/tools/system/package_manager.rst b/reference/tools/system/package_manager.rst index 5567922a371..e4700786a34 100644 --- a/reference/tools/system/package_manager.rst +++ b/reference/tools/system/package_manager.rst @@ -31,7 +31,13 @@ You can use these tools inside the ``system_requirements()`` method of your reci Conan will automatically choose which package manager to use by looking at the Operating System name. In the example above, if we are running on Ubuntu Linux, Conan will ignore all the calls except for the ``Apt()`` one and will only try to install the packages using the -``apt-get`` tool. Conan uses the following mapping by default: +``apt-get`` tool. + +The ``package_manager`` tool allows you to specify the package version of the system package +to be installed using the format ``=``, for example ``Apt(self).install(["libgl-dev=0.0.1"])``. +On systems where package versioning is not supported by the package manager, the provided version will be ignored. + +Conan uses the following mapping by default: * *Apt* for **Linux** with distribution names: *ubuntu*, *debian*, *raspbian* or *linuxmint* * *Yum* for **Linux** with distribution names: *pidora*, *scientific*, *xenserver*, *amazon*, *oracle*, *amzn*, *almalinux* or *rocky* From edc6f5735670befb82176a1705ebbcc3e3549c49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20S=C3=A1nchez=20Falero?= Date: Wed, 23 Jul 2025 07:50:11 +0200 Subject: [PATCH 2/4] Update reference/tools/system/package_manager.rst Co-authored-by: Carlos Zoido --- reference/tools/system/package_manager.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/tools/system/package_manager.rst b/reference/tools/system/package_manager.rst index e4700786a34..b1834d0c0d3 100644 --- a/reference/tools/system/package_manager.rst +++ b/reference/tools/system/package_manager.rst @@ -34,7 +34,7 @@ all the calls except for the ``Apt()`` one and will only try to install the pack ``apt-get`` tool. The ``package_manager`` tool allows you to specify the package version of the system package -to be installed using the format ``=``, for example ``Apt(self).install(["libgl-dev=0.0.1"])``. +to be installed using the format ``=``, for example ``Apt(self).install(["libgl-dev=0.0.1"])``. On systems where package versioning is not supported by the package manager, the provided version will be ignored. Conan uses the following mapping by default: From 0b7e3d5727fdd42333e9f3c595d983649d82c30e Mon Sep 17 00:00:00 2001 From: David Sanchez Date: Wed, 23 Jul 2025 08:05:10 +0200 Subject: [PATCH 3/4] sytem package managers with version list added --- reference/tools/system/package_manager.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/reference/tools/system/package_manager.rst b/reference/tools/system/package_manager.rst index b1834d0c0d3..8e6fc0e7c2a 100644 --- a/reference/tools/system/package_manager.rst +++ b/reference/tools/system/package_manager.rst @@ -35,6 +35,7 @@ all the calls except for the ``Apt()`` one and will only try to install the pack The ``package_manager`` tool allows you to specify the package version of the system package to be installed using the format ``=``, for example ``Apt(self).install(["libgl-dev=0.0.1"])``. +The system package managers that support versions are ``Apt``, ``Yum``, ``Dnf``, ``Brew``, ``Pkg``, ``Chocolatey``, ``Apk`` and ``Zypper``. On systems where package versioning is not supported by the package manager, the provided version will be ignored. Conan uses the following mapping by default: From a8d91f87340af8f4e4802b7621532a5466887241 Mon Sep 17 00:00:00 2001 From: David Sanchez Date: Tue, 29 Jul 2025 11:25:27 +0200 Subject: [PATCH 4/4] system packages that don't support versions added --- reference/tools/system/package_manager.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/tools/system/package_manager.rst b/reference/tools/system/package_manager.rst index 8e6fc0e7c2a..0ae3e42eb5e 100644 --- a/reference/tools/system/package_manager.rst +++ b/reference/tools/system/package_manager.rst @@ -36,7 +36,7 @@ all the calls except for the ``Apt()`` one and will only try to install the pack The ``package_manager`` tool allows you to specify the package version of the system package to be installed using the format ``=``, for example ``Apt(self).install(["libgl-dev=0.0.1"])``. The system package managers that support versions are ``Apt``, ``Yum``, ``Dnf``, ``Brew``, ``Pkg``, ``Chocolatey``, ``Apk`` and ``Zypper``. -On systems where package versioning is not supported by the package manager, the provided version will be ignored. +On systems where package versioning is not supported by the package manager, in our case ``PacMan`` and ``PkgUtil``, the provided version will be ignored. Conan uses the following mapping by default: