You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: reference/commands/config.rst
+52-1Lines changed: 52 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -157,7 +157,8 @@ To install a configuration from a Conan configuration package, it is possible:
157
157
- ``conan config install-pkg`` always look in the server for the latest version or revision.
158
158
- If the same version and revision was downloaded and installed from the server, ``conan config install-pkg`` will be a no-op unless ``--force`` is used, in this case the configuration will be overwritten.
159
159
160
-
It is also possible to make the version of the configuration affect all packages ``package_id`` and be part of the binary model, by activating the ``core.package_id:config_mode`` conf (this is also experimental), to any available mode, like ``minor_mode``.
160
+
It is also possible to make the version of the configuration affect all packages ``package_id`` and be part of the binary model, by activating the ``core.package_id:config_mode`` conf (this is also experimental), to any available mode, like ``minor_mode``. Note that the order of the installation of packages in case multiple configuration packages are installed is important. This is why Conan will raise an error if the relative order of installed configuration packages changes as the result of installing updates for those configuration packages.
161
+
161
162
162
163
As the ``conan config install-pkg`` command downloads the package from a Conan remote server, it can download from an already existing remote,
163
164
or it can download from a Conan remote directly specifying the repository URL:
@@ -219,6 +220,56 @@ Then, developers could do:
219
220
220
221
And they will get the correct configuration for their platform.
221
222
223
+
.. seealso::
224
+
225
+
- If you lock installed configuration packages in a lockfile, you could use the
The ``conan config install-pkg`` admits also as an input a yaml ``conanconfig.yml`` file that can contain more than one package requirement, something like:
234
+
235
+
.. code-block:: yaml
236
+
237
+
packages:
238
+
- myconf_a/0.1
239
+
- myconf_b/0.1
240
+
- myconf_c/[>=1 <2]
241
+
242
+
243
+
and be used like ``conan config install-pkg .`` or even just ``conan config install-pkg``.
244
+
245
+
The file also admits the definition of ``urls`` with the same meaning as the ``--url`` command line argument, to simplify the initial installation
246
+
of configuration when doing a Conan setup:
247
+
248
+
.. code-block:: yaml
249
+
:caption: conanconfig.yml
250
+
251
+
packages:
252
+
- myconf_a/0.1
253
+
- myconf_b/0.1
254
+
- myconf_c/[>=1 <2]
255
+
urls:
256
+
- https://my/conan/remote/repo/url
257
+
258
+
259
+
.. important::
260
+
261
+
When installing more than 1 configuration package, the order of installation is important, as the later installed packages can overwrite
262
+
configuration files installed by the previous ones. Consequently, if you decide to make the configuration part of the packages ``package_id``
263
+
via ``core.package_id:config_mode`` conf, the order is taken into account.
264
+
265
+
Then any installation or re-installation of packages or updates that change this order will be raised as an error. For example if
266
+
after installing the configuration from the ``conanconfig.yml`` above we try to do a ``conan config install-pkg myconf_a/0.2``, that
267
+
will be raised as an error, because that would make ``myconf_a`` to be the latest installed one, not the first.
268
+
269
+
But on the other hand, doing an update with the previous file will not be an error, because it will re-install the ``myconf_a``, ``myconf_b``
270
+
and ``myconf_c`` in order. Likewise, doing an update only for ``myconf_c`` wouldn't be an error, because it is the last one and
Copy file name to clipboardExpand all lines: reference/commands/lock/upgrade.rst
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ conan lock upgrade
7
7
:command: conan lock upgrade -h
8
8
9
9
10
-
The ``conan lock upgrade`` command is able to upgrade ``requires``, ``build_requires``, ``python_requires`` or ``config_requires`` items from an existing lockfile.
10
+
The ``conan lock upgrade`` command is able to upgrade ``requires``, ``build_requires``, ``python_requires`` items from an existing lockfile.
11
11
12
12
For example, if we have the following ``conan.lock``:
0 commit comments