-
-
Notifications
You must be signed in to change notification settings - Fork 63
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
Bail on activation when CONDA_BUILD is set #1694
Conversation
Otherwise, the GDB symlinks will be included in packages built with libarrow as a host dependency.
39167f1
to
7b30757
Compare
Hi! This is the friendly automated conda-forge-linting service. I wanted to let you know that I linted all conda-recipes in your PR ( Here's what I've got... For recipe/meta.yaml:
For recipe/meta.yaml:
This message was generated by GitHub Actions workflow run https://github.com/conda-forge/conda-forge-webservices/actions/runs/12934897643. Examine the logs at this URL for more detail. |
Hi! This is the friendly automated conda-forge-linting service. I just wanted to let you know that I linted all conda-recipes in your PR ( I do have some suggestions for making it better though... For recipe/meta.yaml:
This message was generated by GitHub Actions workflow run https://github.com/conda-forge/conda-forge-webservices/actions/runs/12957715354. Examine the logs at this URL for more detail. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much! 🙏 🙂
recipe/activate.sh
Outdated
# Skip activation if CONDA_BUILD environment variable is set. | ||
# Otherwise, the symlinks will be included in packages built with libarrow as a host dependency. | ||
# <https://github.com/prefix-dev/rattler-build/issues/979#issuecomment-2243070530> | ||
if [ -n "$CONDA_BUILD" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah wait, CI is deep red, failing in
arrow-cpp-feedstock/recipe/meta.yaml
Lines 282 to 283 in b271605
- test -f $PREFIX/share/gdb/auto-load/$PREFIX/lib/libarrow.so.{{ so_version }}-gdb.py # [linux] | |
- test -f $PREFIX/share/gdb/auto-load/$PREFIX/lib/libarrow.{{ so_version }}.dylib-gdb.py # [osx] |
Is
-n
the right argument here?
It seems that In this case, just add something like # need to unset this to test gdb-integration despite https://github.com/conda-forge/arrow-cpp-feedstock/issues/1478
- unset CONDA_BUILD # [unix] before arrow-cpp-feedstock/recipe/meta.yaml Lines 282 to 283 in b271605
|
Indeed.
I wouldn't expect that to have any effect post-initialization though. I'm a bit stumped at the moment. (Or do you still think your suggestion might work?) |
Ah, true! @jaimergp @jakirkham @beckermr, would you have any idea whether it's intentional that |
You should be able to lookup the testing phase using |
Thanks @xhochy, trying that now. TODO: remove the |
I took the liberty to clean up the debug line and add a guard against unset variables. Since the resulting changes git diff d1919bbf00cd928e036d0987ab86d25fa1a7b119..197c2cb181665e0bc9059d654a1fdeadb076c045
diff --git a/recipe/activate.sh b/recipe/activate.sh
index bc796802..2ec4ad24 100755
--- a/recipe/activate.sh
+++ b/recipe/activate.sh
@@ -6,7 +6,7 @@
# doesn't come with a deactivate script, because the symlink
# is benign and doesn't need to be deleted.
-CF_LIBARROW_ACTIVATE_LOGGING=1
+
_la_log() {
if [ "${CF_LIBARROW_ACTIVATE_LOGGING:-}" = "1" ]; then
# The following loop is necessary to handle multi-line strings
@@ -21,9 +21,9 @@ _la_log() {
# Skip activation if CONDA_BUILD environment variable is set.
# (CONDA_BUILD is also set in the test stage, and we don't want to skip there.)
# Otherwise, the symlinks will be included in packages built with libarrow as a host dependency.
-# <https://github.com/prefix-dev/rattler-build/issues/979#issuecomment-2243070530>
-if [ -n "$CONDA_BUILD" ] && [ "$CONDA_BUILD_STATE" != "TEST" ]; then
- _la_log "CONDA_BUILD is set to $CONDA_BUILD and CONDA_BUILD_STATE is $CONDA_BUILD_STATE, skipping libarrow activation."
+# see https://github.com/conda-forge/arrow-cpp-feedstock/issues/1478
+if [ -n "$CONDA_BUILD" ] && [ "${CONDA_BUILD_STATE:-0}" != "TEST" ]; then
+ _la_log "CONDA_BUILD is set to $CONDA_BUILD (and CONDA_BUILD_STATE != \"TEST\"), skipping libarrow activation."
return 0
fi do not change anything functionally, I'm further taking the liberty of merging this. Hope that's OK. :) |
Thanks a lot for the PR, and thanks for the tip @xhochy! 🥳 |
Of course, thanks so much @h-vetinari! |
Use CONDA_BUILD_STATE to prevent bailing on test
Use CONDA_BUILD_STATE to prevent bailing on test
Use CONDA_BUILD_STATE to prevent bailing on test
Otherwise, the GDB symlinks will be included in packages built with libarrow as a host dependency.
Closes #1478
Checklist
0
(if the version changed)conda-smithy
(Use the phrase@conda-forge-admin, please rerender
in a comment in this PR for automated rerendering)