[3.1] ensure an empty llvm-dev dep doesn't make its way to mandel-dev .deb #618
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When packing the experimental mandel-dev package need to more mindful when trying to discover the llvm-dev package currently in use. (we need to discover this because for some version of Ubuntu we don't know if someone used llvm-11-dev or llvm-10-dev or llvm-9-dev or ... yes all those are available in Ubuntu 20.04). If we're not mindful when doing the discovery we can accidentally stick an empty dependency in to the dependency list leading to a Bad Time.
First off, don't even perform the discovery if
LLVM_CMAKE_DIR
isn't set, which will be the case on something like aarch64 (arm8) where EOS VM OC isn't supported ergo there is no dep on llvm in the first place.Second, ouch that
LLVM_PKG_FIND_RESULT EQUAL 0
check is no good because like a pipe on the command line it only gets you the exit status of the last command (cut
in this case, which is happy to return 0 whendpkg-query
returns no output on stdout when it errors out). This look up will fail when doing a pinned build because a pinned build doesn't use the system LLVM packages. Really what we should be using here isRESULTS_VARIABLE
but sadly that's CMake 3.10+. Just change this to make sureLLVM_PKG_FIND_OUTPUT
isn't empty which seems good enough from my testing sincedpkg-query
is silent on stdout on error.