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

Added mention to apk package manager #3312

Merged
merged 3 commits into from
Aug 28, 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
2 changes: 1 addition & 1 deletion reference/commands/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ Displays all the Conan built-in configurations. There are 2 groups:
tools.system.package_manager:mode: Mode for package_manager tools: 'check', 'report', 'report-installed' or 'install'
tools.system.package_manager:sudo: Use 'sudo' when invoking the package manager tools in Linux (False by default)
tools.system.package_manager:sudo_askpass: Use the '-A' argument if using sudo in Linux to invoke the system package manager (False by default)
tools.system.package_manager:tool: Default package manager tool: 'apt-get', 'yum', 'dnf', 'brew', 'pacman', 'choco', 'zypper', 'pkg' or 'pkgutil'
tools.system.package_manager:tool: Default package manager tool: 'apk', 'apt-get', 'yum', 'dnf', 'brew', 'pacman', 'choco', 'zypper', 'pkg' or 'pkgutil'


.. seealso::
Expand Down
2 changes: 1 addition & 1 deletion reference/config_files/global_conf.rst
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ To list all the possible configurations available, run :command:`conan config li
tools.system.package_manager:mode: Mode for package_manager tools: 'check', 'report', 'report-installed' or 'install'
tools.system.package_manager:sudo: Use 'sudo' when invoking the package manager tools in Linux (False by default)
tools.system.package_manager:sudo_askpass: Use the '-A' argument if using sudo in Linux to invoke the system package manager (False by default)
tools.system.package_manager:tool: Default package manager tool: 'apt-get', 'yum', 'dnf', 'brew', 'pacman', 'choco', 'zypper', 'pkg' or 'pkgutil'
tools.system.package_manager:tool: Default package manager tool: 'apk', 'apt-get', 'yum', 'dnf', 'brew', 'pacman', 'choco', 'zypper', 'pkg' or 'pkgutil'


User/Tools configurations
Expand Down
30 changes: 26 additions & 4 deletions reference/tools/system/package_manager.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,20 @@ all the calls except for the ``Apt()`` one and will only try to install the pack
* *Apt* for **Linux** with distribution names: *ubuntu*, *debian* or *raspbian*
* *Yum* for **Linux** with distribution names: *pidora*, *scientific*, *xenserver*, *amazon*, *oracle*, *amzn*, *almalinux* or *rocky*
* *Dnf* for **Linux** with distribution names: *fedora*, *rhel*, *centos*, *mageia*
* *Apk* for **Linux** with distribution names: *alpine*
* *Brew* for **macOS**
* *PacMan* for **Linux** with distribution names: *arch*, *manjaro* and when using **Windows** with *msys2*
* *Chocolatey* for **Windows**
* *Zypper* for **Linux** with distribution names: *opensuse*, *sles*
* *Pkg* for **Linux** with distribution names: *freebsd*
* *Pkg* for **FreeBSD**
* *PkgUtil* for **Solaris**

You can override this default mapping and set the package manager tool you want to use by
default setting the configuration property `tools.system.package_manager:tool`.

.. _conan_tools_system_package_manager_methods:

Methods available for system package manager tools
Methods available for system package manager tools
--------------------------------------------------

All these wrappers share three methods that represent the most common operations with a
Expand Down Expand Up @@ -85,8 +86,8 @@ As explained above there are several ``[conf]`` that
affect how these tools are invoked:

* ``tools.system.package_manager:tool``: to choose which package manager tool you want to
use by default: ``"apt-get"``, ``"yum"``, ``"dnf"``, ``"brew"``, ``"pacman"``,
``"choco"``, ``"zypper"``, ``"pkg"`` or ``"pkgutil"``
use by default: ``"apk"``, ``"apt-get"``, ``"yum"``, ``"dnf"``, ``"brew"``,
``"pacman"``, ``"choco"``, ``"zypper"``, ``"pkg"`` or ``"pkgutil"``

* ``tools.system.package_manager:mode``: mode to use when invoking the package manager
tool. There are two possible values:
Expand Down Expand Up @@ -114,6 +115,27 @@ affect how these tools are invoked:

There are some specific arguments for each of these tools. Here is the complete reference:

.. _conan_tools_system_package_manager_apk:

conan.tools.system.package_manager.Apk
---------------------------------------

Will invoke the *apk* command. Enabled by default for **Linux** with distribution names:
*alpine*.

Reference
+++++++++

.. currentmodule:: conan.tools.system.package_manager

.. autoclass:: Apk
:members:
:inherited-members:


Alpine Linux does not support multiple architectures in the same repository, so there is
no mapping from Conan architectures to Alpine architectures.

.. _conan_tools_system_package_manager_apt:

conan.tools.system.package_manager.Apt
Expand Down