bincrafters / community

Central repository for issues and recipes
http://bincrafters.readthedocs.io/en/latest/
MIT License
217 stars 36 forks source link

caf/0.17.6: Log level option broken #1242

Closed sourcedelica closed 4 years ago

sourcedelica commented 4 years ago

Package and Environment Details (include every applicable attribute)

Conan profile (output of conan profile show default or conan profile show <profile> if custom profile is in use)

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

Steps to reproduce (Include if Applicable)

Create package with the log_level option set.

$ conan create . eric/test -o caf:log_level=DEBUG
...
ERROR: caf/0.17.6@eric/test: Error in build() method, line 93
    cmake = self._cmake_configure()
while calling '_cmake_configure', line 77
    cmake.definitions["CAF_LOG_LEVEL"] = self.default_options['log_level'].index(self.options.log_level.value)
    ValueError: substring not found

I will submit a PR for this.

Logs (Include/Attach if Applicable)

Click to expand log ``` $ conan create . eric/test -o caf:log_level=DEBUG Exporting package recipe caf/0.17.6@eric/test exports_sources: Copied 1 '.txt' file: CMakeLists.txt caf/0.17.6@eric/test exports_sources: Copied 1 '.patch' file: caf.patch caf/0.17.6@eric/test: A new conanfile.py version was exported caf/0.17.6@eric/test: Folder: /Users/eric/.conan/data/caf/0.17.6/eric/test/export caf/0.17.6@eric/test: Package recipe modified in export, forcing source folder removal caf/0.17.6@eric/test: Use the --keep-source, -k option to skip it caf/0.17.6@eric/test: Exported revision: d94c7e37a6b7bdc94ae1f40387350b58 Configuration: [settings] arch=x86_64 arch_build=x86_64 build_type=Release compiler=apple-clang compiler.libcxx=libc++ compiler.version=11.0 os=Macos os_build=Macos [options] caf:log_level=DEBUG [build_requires] [env] caf/0.17.6@eric/test: Forced build from source caf/0.17.6@eric/test (test package): Installing package Requirements caf/0.17.6@eric/test from local cache - Cache openssl/1.0.2u from 'conan-center' - Cache zlib/1.2.11 from 'conan-center' - Cache Packages caf/0.17.6@eric/test:2153364eac0b1744f61925cfa8bcd31534f230f8 - Build openssl/1.0.2u:eb50d18a5a5d59bd0c332464a4c348ab65e353bf - Cache zlib/1.2.11:f74366f76f700cc6e991285892ad7a23c30e6d47 - Cache Installing (downloading, building) binaries... zlib/1.2.11: Already installed! openssl/1.0.2u: Already installed! caf/0.17.6@eric/test: WARN: Build folder is dirty, removing it: /Users/eric/.conan/data/caf/0.17.6/eric/test/build/2153364eac0b1744f61925cfa8bcd31534f230f8 caf/0.17.6@eric/test: Configuring sources in /Users/eric/.conan/data/caf/0.17.6/eric/test/source Downloading 0.17.6.tar.gz completed [2599.12k] caf/0.17.6@eric/test: Copying sources to build folder caf/0.17.6@eric/test: Building your package in /Users/eric/.conan/data/caf/0.17.6/eric/test/build/2153364eac0b1744f61925cfa8bcd31534f230f8 caf/0.17.6@eric/test: Generator cmake created conanbuildinfo.cmake caf/0.17.6@eric/test: Calling build() caf/0.17.6@eric/test: caf/0.17.6@eric/test: ERROR: Package '2153364eac0b1744f61925cfa8bcd31534f230f8' build failed caf/0.17.6@eric/test: WARN: Build folder /Users/eric/.conan/data/caf/0.17.6/eric/test/build/2153364eac0b1744f61925cfa8bcd31534f230f8 ERROR: caf/0.17.6@eric/test: Error in build() method, line 93 cmake = self._cmake_configure() while calling '_cmake_configure', line 77 cmake.definitions["CAF_LOG_LEVEL"] = self.default_options['log_level'].index(self.options.log_level.value) ValueError: substring not found ```
ericLemanissier commented 4 years ago

fixed with https://github.com/bincrafters/conan-caf/pull/24