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

Add to docs explanation about the option 'host_package' in install() #3401

Merged
merged 1 commit into from
Sep 26, 2023
Merged
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
8 changes: 5 additions & 3 deletions reference/tools/system/package_manager.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,16 @@ system package manager. They take the same form for all of the package managers
*Apt* that also accepts the *recommends* argument for the :ref:`install
method<conan_tools_system_package_manager_apt>`.

* ``install(self, packages, update=False, check=True):`` try to install
* ``install(self, packages, update=False, check=True, host_tool=True):`` try to install
the list of packages passed as a parameter. If the parameter ``check`` is ``True`` it
will check if those packages are already installed before installing them. If the
parameter ``update`` is ``True`` it will try to update the package manager database
before checking and installing. Its behaviour is affected by the value of
``tools.system.package_manager:mode``
:ref:`configuration<conan_tools_system_package_manager_config>`. It will return the
return code of the executed commands.
:ref:`configuration<conan_tools_system_package_manager_config>`. If the parameter
``host_package`` is ``True`` it will install the packages for the host machine
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

host_package != host_tool, is this correct?

Copy link
Contributor Author

@czoido czoido Sep 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, sorry, it's wrong, I'll change that

architecture (the machine that will run the software), it has an effect when cross
building. This method will return the return code of the executed commands.
* ``install_substitutes(packages_substitutes, update=False, check=True)``: try to install
the list of lists of substitutes packages passed as a parameter, e.g., ``[["pkg1", "pkg2"], ["pkg3"]]``.
It succeeds if one of the substitutes list is completely installed, so it's intended to be used when you have
Expand Down