-
-
Notifications
You must be signed in to change notification settings - Fork 490
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
Do not run sage-env more than once, for real. #36364
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 tasks
dimpase
reviewed
Sep 29, 2023
Documentation preview for this PR (built with commit b081169; changes) is ready! 🎉 |
mkoeppe
approved these changes
Sep 30, 2023
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.
LGTM.
Great, thank you! |
vbraun
pushed a commit
to vbraun/sage
that referenced
this pull request
Oct 1, 2023
<!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes sagemath#1234" use "Introduce new method to calculate 1+1" --> Do not run sage-env more than once. <!-- Describe your changes here in detail --> <!-- Why is this change required? What problem does it solve? --> <!-- If this PR resolves an open issue, please link to it here. For example "Fixes sagemath#12345". --> In the previous version of sage-env, in the lines ``` SAGE_ENV_VERSION="6:$SAGE_LOCAL:$SAGE_VENV:$SAGE_SRC" if [ "$SAGE_ENV_SOURCED" = "$SAGE_ENV_VERSION" ]; then # Already sourced, nothing to do. return 0 fi export SAGE_ENV_SOURCED="$SAGE_ENV_VERSION" ``` the test would fail the first time, as it should, but when the rest of the file was executed, SAGE_SRC would get changed. That meant that the test would fail the next time and so the file would get executed again. We move the last line to the end of the file, and also change it to explicitly use `SAGE_LOCAL`, `SAGE_VENV`, and `SAGE_SRC` so that it uses the up-to-date versions. This should fix part of the problem in sagemath#36337: it should prevent duplicate `-rpath` entries which were arising because sage-env was getting executed twice. <!-- If your change requires a documentation PR, please link it appropriately. --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> <!-- Feel free to remove irrelevant items. --> - [X] The title is concise, informative, and self-explanatory. - [X] The description explains in detail what this PR is about. - [X] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on - sagemath#12345: short description why this is a dependency - sagemath#34567: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: sagemath#36364 Reported by: John H. Palmieri Reviewer(s): Dima Pasechnik, John H. Palmieri, Matthias Köppe
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Do not run sage-env more than once.
In the previous version of sage-env, in the lines
the test would fail the first time, as it should, but when the rest of the file was executed, SAGE_SRC would get changed. That meant that the test would fail the next time and so the file would get executed again. We move the last line to the end of the file, and also change it to explicitly use
SAGE_LOCAL
,SAGE_VENV
, andSAGE_SRC
so that it uses the up-to-date versions.This should fix part of the problem in #36337: it should prevent duplicate
-rpath
entries which were arising because sage-env was getting executed twice.📝 Checklist
⌛ Dependencies