From 88e229ca60e7d5e5390fe79f103b15ea6edc58ea Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Wed, 14 Aug 2024 12:46:51 +0200 Subject: [PATCH] Update pkg-config recommendation Signed-off-by: Uilian Ries --- reference/conanfile/attributes.rst | 1 + reference/tools/gnu/pkgconfig.rst | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/reference/conanfile/attributes.rst b/reference/conanfile/attributes.rst index fd3e1994324..d05a626b43b 100644 --- a/reference/conanfile/attributes.rst +++ b/reference/conanfile/attributes.rst @@ -126,6 +126,7 @@ recipe or the package, then it is possible to exclude them from the check with t configuration, which is a list of patterns (fnmatch) to exclude. +.. _upload_policy_attribute: upload_policy ------------- diff --git a/reference/tools/gnu/pkgconfig.rst b/reference/tools/gnu/pkgconfig.rst index f21c877f052..76b4fcb2c55 100644 --- a/reference/tools/gnu/pkgconfig.rst +++ b/reference/tools/gnu/pkgconfig.rst @@ -47,7 +47,7 @@ Using pkg-config from Conan package instead of system .. include:: ../../../common/experimental_warning.inc -In case of not having ``pkg-config`` available in the system, it is possible to use the ``pkg-config`` executable provided by a Conan package: +In case of not having ``pkg-config`` available in the system, it is possible to use the ``pkg-config`` executable provided by Conan ``tool_requires`` instead.: .. code-block:: python @@ -80,9 +80,12 @@ when consuming the package. .. warning:: - It's not recommended to use this approach when creating a "system" package recipe, as the packaged information may not be compatible with the host system, + It's forbidden to upload or reuse this approach when creating a package, as the information may not be compatible with the host system, resulting in errors when consuming the package. + When using this approach for wrapping system packages, it is recommended to use ``upload_policy = "skip"`` + (see :ref:`upload_policy_attribute`) in the package recipe to avoid uploading the package. + Reference ---------