Skip to content

Commit 2722084

Browse files
memshardedczoido
andauthored
ipmrove install_substitutes (#4117)
Co-authored-by: Carlos Zoido <mrgalleta@gmail.com>
1 parent 8388598 commit 2722084

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

reference/tools/system/package_manager.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,12 @@ method<conan_tools_system_package_manager_apt>`.
6868
architecture (the machine that will run the software), it has an effect when cross
6969
building. This method will return the return code of the executed commands.
7070
* ``install_substitutes(packages_substitutes, update=False, check=True)``: try to install
71-
the list of lists of substitutes packages passed as a parameter, e.g., ``[["pkg1", "pkg2"], ["pkg3"]]``.
71+
one of the lists of substitutes packages passed as a parameter, e.g., ``install_substitutes(["pkg1", "pkg2"], ["pkg3"])``.
7272
It succeeds if one of the substitutes list is completely installed, so it's intended to be used when you have
73-
different packages for different distros. Internally, it's calling the previous
74-
``install(packages, update=update, check=check)`` method, so ``update`` and ``check`` have the same
75-
purpose as above.
73+
different packages for different distros. In this example, it will first try to install ``pkg1`` and ``pkg2``, if
74+
it succeeds to install both packages, it will stop. If it fails, it will proceed to the next list and try to install ``pkg3``.
75+
Internally, it's calling the previous ``install(packages, update=update, check=check)`` method, so ``update``
76+
and ``check`` have the same purpose as above.
7677
* ``update()`` update the system package manager database. Its behaviour is affected by
7778
the value of ``tools.system.package_manager:mode``
7879
:ref:`configuration<conan_tools_system_package_manager_config>`.

0 commit comments

Comments
 (0)