Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.1] ensure an empty llvm-dev dep doesn't make its way to mandel-dev .deb #618

Merged
merged 1 commit into from
Jul 8, 2022

Conversation

spoonincode
Copy link
Member

@spoonincode spoonincode commented Jul 7, 2022

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 when dpkg-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 is RESULTS_VARIABLE but sadly that's CMake 3.10+. Just change this to make sure LLVM_PKG_FIND_OUTPUT isn't empty which seems good enough from my testing since dpkg-query is silent on stdout on error.

@spoonincode spoonincode changed the title ensure an empty llvm-dev dep doesn't make its way to mandel-dev .deb [3.1] ensure an empty llvm-dev dep doesn't make its way to mandel-dev .deb Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants