conan-io / hooks

Official Conan client hooks
MIT License
32 stars 46 forks source link

[conan-center] KB-H071 impossible(?) to satisfy for xorg recipe #423

Closed paulharris closed 2 years ago

paulharris commented 2 years ago

Please see build problem on PR https://github.com/conan-io/conan-center-index/pull/10902

Log message:

xorg/system: WARN: This conanfile has no build step
xorg/system: WARN: This conanfile has no package step
xorg/system package(): WARN: No files in this package!
[HOOK - conan-center.py] post_package_info(): ERROR: [INCLUDE PATH DOES NOT EXIST (KB-H071)] Component xorg::xorg include dir 'include' is listed in the recipe, but not found in package folder. The include dir should probably be fixed or removed. (https://github.com/conan-io/conan-center-index/blob/master/docs/error_knowledge_base.md#KB-H071) 
ERROR: 
    ConanException: [HOOK - conan-center.py] post_package_info(): Some checks failed running the hook, check the output

Note that it complains about "xorg::xorg", but this package ONLY defines components, and you can't adjust the includedirs for a component of the same name as the package (so says the error message when I tried), nor can I set the includedirs to empty on the base cpp_info (as there are components).

ericLemanissier commented 2 years ago

@paulharris it should be fixed with https://github.com/paulharris/conan-center-index/pull/2

paulharris commented 2 years ago

I'm sure I tried that. It complained you can't do stuff to the root cpp_info if there are components.

ericLemanissier commented 2 years ago

we have two routes here:

  1. change the hook so that it does not check the global cpp_info if there are components declared
  2. change conan, so that cpp_info.includedirs is empty if there are components declared

the second one seems the more correct to me, but it may be breaking some cases (probably already ill-formed) ?

paulharris commented 2 years ago

@ericLemanissier did this get fixed? Could I close this?

ericLemanissier commented 2 years ago

yes. It was first worked-around with https://github.com/conan-io/conan-center-index/commit/b954a1afeeca5f8cb6d012a5d6f4193490765a8f#diff-29d8ef69349500dae640af15595f8d2cb1ff167c984fc8e7d46a315ab6c9e441R88 then fixed with https://github.com/conan-io/hooks/commit/f1511deef1faa3af148ebf0dc78d1133bedaac5b, so the workaround was removed in https://github.com/conan-io/conan-center-index/commit/dba6d8b1cf9c3df2f54f7a80eeba3ba1610fac98

paulharris commented 2 years ago

Yay :)