Repository: conan-io/conan-center-index

Issue:
[package] <qxmpp>/<1.4.0>: Dependency conflict for openssl
### Package and Environment Details

* Package Name/Version: **qxmpp/1.4.0**
* Operating System+version: **macOS 12.5 x86_64**
* Compiler+version: **clang-1316.0.21.2.5**
* Docker image: **none**
* Conan version: **1.15.1**
* Python version: **Python 3.9.12**


### Conan profile

[settings]
os=Macos
os_build=Macos
arch=x86_64
arch_build=x86_64
compiler=apple-clang
compiler.version=13
compiler.libcxx=libc++
build_type=Release
[options]
[conf]
[build_requires]
[env]

### Steps to reproduce

Checkout conan-center-index:

```
cd conan-center-index/recipes/qxmpp/all
conan create conanfile.py qxmpp/1.4.0@ --build missing
```

Expected: build succeeds.

Actual: conan complains of a dependency conflict due to qxmpp's dependencies using explicitly different versions of openssl.

### Logs

<details><summary>Click to expand log</summary>

```
❯ conan create conanfile.py qxmpp/1.4.0@ --build missing
[HOOK - conan-center.py] pre_export(): [DEPRECATED GLOBAL CPPSTD (KB-H001)] OK
[HOOK - conan-center.py] pre_export(): [REFERENCE LOWERCASE (KB-H002)] OK
[HOOK - conan-center.py] pre_export(): [RECIPE METADATA (KB-H003)] OK
[HOOK - conan-center.py] pre_export(): [HEADER_ONLY, NO COPY SOURCE (KB-H005)] OK
[HOOK - conan-center.py] pre_export(): [FPIC OPTION (KB-H006)] OK
[HOOK - conan-center.py] pre_export(): [VERSION RANGES (KB-H008)] OK
[HOOK - conan-center.py] pre_export(): [RECIPE FOLDER SIZE (KB-H009)] Total recipe size: 6.2978515625 KB
[HOOK - conan-center.py] pre_export(): [RECIPE FOLDER SIZE (KB-H009)] OK
[HOOK - conan-center.py] pre_export(): [EXPORT LICENSE (KB-H023)] exports: None
[HOOK - conan-center.py] pre_export(): [EXPORT LICENSE (KB-H023)] exports: None
[HOOK - conan-center.py] pre_export(): [EXPORT LICENSE (KB-H023)] OK
[HOOK - conan-center.py] pre_export(): [TEST PACKAGE FOLDER (KB-H024)] OK
[HOOK - conan-center.py] pre_export(): [META LINES (KB-H025)] OK
[HOOK - conan-center.py] pre_export(): [CONAN CENTER INDEX URL (KB-H027)] OK
[HOOK - conan-center.py] pre_export(): [CMAKE MINIMUM VERSION (KB-H028)] OK
[HOOK - conan-center.py] pre_export(): [TEST PACKAGE - RUN ENVIRONMENT (KB-H029)] OK
[HOOK - conan-center.py] pre_export(): [SYSTEM REQUIREMENTS (KB-H032)] OK
[HOOK - conan-center.py] pre_export(): [CONANDATA.YML FORMAT (KB-H030)] OK
[HOOK - conan-center.py] pre_export(): [TEST PACKAGE - NO IMPORTS() (KB-H034)] OK
[HOOK - conan-center.py] pre_export(): [NO AUTHOR (KB-H037)] OK
[HOOK - conan-center.py] pre_export(): [NOT ALLOWED ATTRIBUTES (KB-H039)] OK
[HOOK - conan-center.py] pre_export(): [NO TARGET NAME (KB-H040)] OK
[HOOK - conan-center.py] pre_export(): [NO FINAL ENDLINE (KB-H041)] OK
[HOOK - conan-center.py] pre_export(): [NO REQUIRES.ADD() (KB-H044)] OK
[HOOK - conan-center.py] pre_export(): [DELETE OPTIONS (KB-H045)] OK
[HOOK - conan-center.py] pre_export(): [CMAKE VERBOSE MAKEFILE (KB-H046)] OK
[HOOK - conan-center.py] pre_export(): [CMAKE VERSION REQUIRED (KB-H048)] OK
[HOOK - conan-center.py] pre_export(): [CMAKE WINDOWS EXPORT ALL SYMBOLS (KB-H049)] OK
[HOOK - conan-center.py] pre_export(): [DEFAULT OPTIONS AS DICTIONARY (KB-H051)] OK
[HOOK - conan-center.py] pre_export(): [CONFIG.YML HAS NEW VERSION (KB-H052)] OK
[HOOK - conan-center.py] pre_export(): [PRIVATE IMPORTS (KB-H053)] OK
[HOOK - conan-center.py] pre_export(): [SINGLE REQUIRES (KB-H055)] OK
[HOOK - conan-center.py] pre_export(): [TOOLS RENAME (KB-H057)] OK
[HOOK - conan-center.py] pre_export(): [ILLEGAL CHARACTERS (KB-H058)] OK
[HOOK - conan-center.py] pre_export(): [CLASS NAME (KB-H059)] OK
[HOOK - conan-center.py] pre_export(): [NO CRLF (KB-H060)] OK
[HOOK - conan-center.py] pre_export(): [NO BUILD SYSTEM FUNCTIONS (KB-H061)] OK
[HOOK - conan-center.py] pre_export(): [TOOLS CROSS BUILDING (KB-H062)] OK
[HOOK - conan-center.py] pre_export(): [INVALID TOPICS (KB-H064)] OK
[HOOK - conan-center.py] pre_export(): [NO REQUIRED_CONAN_VERSION (KB-H065)] OK
[HOOK - conan-center.py] pre_export(): [TEST_TYPE MANAGEMENT (KB-H068)] OK
[HOOK - conan-center.py] pre_export(): [TEST PACKAGE - NO DEFAULT OPTIONS (KB-H069)] OK
[HOOK - conan-center.py] pre_export(): [MANDATORY SETTINGS (KB-H070)] OK
Exporting package recipe
qxmpp/1.4.0 exports: File 'conandata.yml' found. Exporting it...
qxmpp/1.4.0 exports: Copied 1 '.yml' file: conandata.yml
qxmpp/1.4.0: Calling export_sources()
qxmpp/1.4.0 export_sources() method: Copied 1 '.txt' file: CMakeLists.txt
qxmpp/1.4.0 export_sources() method: Copied 2 '.patch' files: 001-add_conan_1.4.0.patch, 002-add_gstreamer_1.4.0.patch
[HOOK - conan-center.py] post_export(): [CONANDATA.YML REDUCE (KB-H031)] Saving conandata.yml: {'sources': {'1.4.0': {'url': 'https://github.com/qxmpp-project/qxmpp/archive/refs/tags/v1.4.0.tar.gz', 'sha256': '2148162138eaf4b431a6ee94104f87877b85a589da803dff9433c698b4cf4f19'}}, 'patches': {'1.4.0': [{'patch_file': 'patches/001-add_conan_1.4.0.patch', 'base_path': 'source_subfolder'}, {'patch_file': 'patches/002-add_gstreamer_1.4.0.patch', 'base_path': 'source_subfolder'}]}}
[HOOK - conan-center.py] post_export(): [CONANDATA.YML REDUCE (KB-H031)] New conandata.yml contents: patches:
  1.4.0:
  - base_path: source_subfolder
    patch_file: patches/001-add_conan_1.4.0.patch
  - base_path: source_subfolder
    patch_file: patches/002-add_gstreamer_1.4.0.patch
sources:
  1.4.0:
    sha256: 2148162138eaf4b431a6ee94104f87877b85a589da803dff9433c698b4cf4f19
    url: https://github.com/qxmpp-project/qxmpp/archive/refs/tags/v1.4.0.tar.gz

[HOOK - conan-center.py] post_export(): [CONANDATA.YML REDUCE (KB-H031)] OK
[HOOK - conan-center.py] post_export(): [DEFAULT SHARED OPTION VALUE (KB-H050)] OK
[HOOK - conan-center.py] post_export(): [LICENSE PUBLIC DOMAIN (KB-H056)] OK
qxmpp/1.4.0: A new conanfile.py version was exported
qxmpp/1.4.0: Folder: /Users/jason/.conan/data/qxmpp/1.4.0/_/_/export
qxmpp/1.4.0: Package recipe modified in export, forcing source folder removal
qxmpp/1.4.0: Use the --keep-source, -k option to skip it
qxmpp/1.4.0: Exported revision: 2589356ff2dbdba60e41b3f2e7dc4633
Configuration:
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=apple-clang
compiler.libcxx=libc++
compiler.version=13
os=Macos
os_build=Macos
[options]
[build_requires]
[env]

WARN: pcre2/10.37: requirement zlib/1.2.12 overridden by qt/6.2.3 to zlib/1.2.11 
WARN: freetype/2.11.1: requirement zlib/1.2.12 overridden by qt/6.2.3 to zlib/1.2.11 
WARN: libpng/1.6.37: requirement zlib/1.2.12 overridden by freetype/2.11.1 to zlib/1.2.11 
WARN: harfbuzz/4.0.1: requirement freetype/2.12.1 overridden by qt/6.2.3 to freetype/2.11.1 
WARN: glib/2.73.1: requirement zlib/1.2.12 overridden by harfbuzz/4.0.1 to zlib/1.2.11 
WARN: pcre/8.45: requirement zlib/1.2.12 overridden by glib/2.73.1 to zlib/1.2.11 
brotli/1.0.9: Main binary package '299aaabcb5fb1385c096ccf2c550a653c4438173' missing. Using compatible package 'e4fbacdee83eb1a2e68227ffe19f6e9a61b36cbc'
double-conversion/3.2.0: Main binary package '0094e5ca692951fde1f9889e7498de22717262dd' missing. Using compatible package '1aff124b71f6d938138ecd7179ff075f4304a85d'
libffi/3.4.2: Main binary package '299aaabcb5fb1385c096ccf2c550a653c4438173' missing. Using compatible package 'e4fbacdee83eb1a2e68227ffe19f6e9a61b36cbc'
libpq/13.6: Main binary package '299aaabcb5fb1385c096ccf2c550a653c4438173' missing. Using compatible package 'e4fbacdee83eb1a2e68227ffe19f6e9a61b36cbc'
openssl/1.1.1m: Main binary package '299aaabcb5fb1385c096ccf2c550a653c4438173' missing. Using compatible package 'e4fbacdee83eb1a2e68227ffe19f6e9a61b36cbc'
sqlite3/3.38.0: Main binary package '2509706a7709a45ed7956bba745feda71f8ba0e3' missing. Using compatible package '7ab77de75b40c4f7bbfdae40977882ce74a53cec'
zlib/1.2.11: Main binary package '299aaabcb5fb1385c096ccf2c550a653c4438173' missing. Using compatible package 'e4fbacdee83eb1a2e68227ffe19f6e9a61b36cbc'
libgettext/0.21: Main binary package 'ec9c4e39d5a725b14ea296db9a261fc72a07bc74' missing. Using compatible package '093defb2b8902dbb1cd5737e8d24a7f794ccc2d9'
libpng/1.6.37: Main binary package '57af081259617d6f85143e5a139c90e9c531fc6b' missing. Using compatible package 'aa5d2c35e57d031363e527ecb0b07150ed151373'
odbc/2.3.9: Main binary package '7c1e3daf92f8fd5646e659a9c923880cd4653d17' missing. Using compatible package 'a378317c51ebc76840b3893182ac29a3ab19e036'
pcre/8.45: Main binary package 'd7974850790d13a1154a6a56583a74eb58adf68b' missing. Using compatible package 'a86359bb8915e4a8a57e48ce80b6c346f70f9755'
pcre2/10.37: Main binary package 'bc05aab3448cb72e1bce577aded45fecfd9bd6cd' missing. Using compatible package '821b78acf7d26281b12b22529d6ac5e59961c3af'
freetype/2.11.1: Main binary package 'e71b79b3fb90afa81a00d6d013962820d70f8969' missing. Using compatible package '926ec86ec76de2940f5d319a90b247e8ad515ede'
ERROR: Conflict in cmake/3.22.0:
    'cmake/3.22.0' requires 'openssl/1.1.1o' while 'qt/6.2.3' requires 'openssl/1.1.1m'.
    To fix this conflict you need to override the package 'openssl' in your root package.
```

</details>



Discussion:

Resolving patch:
diff --git a/recipes/qxmpp/all/conanfile.py b/recipes/qxmpp/all/conanfile.py
--- a/recipes/qxmpp/all/conanfile.py
+++ b/recipes/qxmpp/all/conanfile.py
@@ -1,5 +1,6 @@
-from conan.tools.files import rename
-from conans import ConanFile, CMake, tools
+from conan import ConanFile
+from conan.tools import files
+from conans import CMake
 import functools
 import os
 
@@ -46,13 +47,13 @@ def configure(self):
             del self.options.fPIC
 
     def requirements(self):
-        self.requires("qt/6.2.3")
+        self.requires("qt/6.2.4")
         if self.options.with_gstreamer:
             self.requires("gstreamer/1.19.2")
             self.requires("glib/2.70.1")
 
     def source(self):
-        tools.get(**self.conan_data["sources"][self.version], strip_root=True, destination=self._source_subfolder)
+        files.get(self, **self.conan_data["sources"][self.version], strip_root=True, destination=self._source_subfolder)
 
     @functools.lru_cache(1)
     def _configure_cmake(self):
@@ -67,7 +68,7 @@ def _configure_cmake(self):
 
     def build(self):
         for patch in self.conan_data.get("patches", {}).get(self.version, []):
-            tools.patch(**patch)
+            files.patch(self, **patch)
         cmake = self._configure_cmake()
         cmake.build()
 
@@ -75,12 +76,12 @@ def package(self):
         self.copy("LICENSE.LGPL", dst="licenses", src=self._source_subfolder)
         cmake = self._configure_cmake()
         cmake.install()
-        tools.rmdir(os.path.join(self.package_folder, "lib", "cmake"))
-        tools.rmdir(os.path.join(self.package_folder, "lib", "pkgconfig"))
+        files.rmdir(self, os.path.join(self.package_folder, "lib", "cmake"))
+        files.rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig"))
 
         if self.options.shared and self.settings.os == "Windows":
-            tools.mkdir(os.path.join(self.package_folder, "bin"))
-            rename(self, os.path.join(self.package_folder, "lib", "qxmpp.dll"),
+            files.mkdir(self, os.path.join(self.package_folder, "bin"))
+            files.rename(self, os.path.join(self.package_folder, "lib", "qxmpp.dll"),
                          os.path.join(self.package_folder, "bin", "qxmpp.dll"))
 
     def package_info(self):


Test patch: