-
-
Notifications
You must be signed in to change notification settings - Fork 481
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
Replace bashism in src/bin/sage-env #30128
Comments
comment:1
Which scripts runs sage-env under /bin/sh? It's clearly documented that it's to be run in bash |
comment:2
That documentation was wrong after #29345, I just never noticed the comment to remove it. The "make" process itself is run with
in |
comment:3
Ah ok, this is the code for script packages? I want to revise that anyway. Is there another place? |
comment:5
A quick fix is just to set |
comment:6
I think I may be able to solve this pretty easily by changing all instances of sage-env really shouldn't know about sage-env-config at all, the split between the two was made at another level of abstraction. But practically, whoever is sourcing sage-env also knows the path to sage-env-config, and sage-env-config knows |
comment:7
Great point, please go ahead. Note there's another related ticket - #29951 ( |
comment:8
Replying to @mkoeppe:
If for no other reason than because I will temporarily understand how all of this works. I think I have the bashism thing fixed, waiting for a full rebuild of the distribution to be sure. After that #29951 looks pretty easy. Then maybe #29850... but trying to source |
comment:9
Replying to @orlitzky:
I don't think this is a problem because at build time I think (hope) you are sourcing |
comment:10
Ok, so we can just source it from |
comment:11
I would prefer sourcing from |
comment:12
Ultimately I am hoping that we can remove the dependence of the build on |
Branch: u/mjo/ticket/30128 |
Commit: |
comment:13
This seems to work:
New commits:
|
Author: Michael Orlitzky |
comment:14
Looking great. I'll try it out later today |
comment:15
|
comment:16
Replying to @mkoeppe:
I dunno. Do you know the name of one of those packages? I don't have anything uninstall-related in |
comment:17
|
comment:18
Definitely the prerm and postrm scripts are installed in |
comment:20
I did have to fix the prerm/postrm script generator, I had missed one sourcing of sage-env in there. The only two packages that had those scripts installed were gap and pplpy, both of which can be uninstalled afterwards:
|
comment:21
The thing is that these scripts are installed with the intention that if you switch the source tree to a different version, the uninstall will still be done with the script that installed that version. |
comment:22
Ah OK - I see that you have taken care of my concern already. |
Reviewer: Matthias Koeppe |
comment:24
That test for a "broken gcc" in $SAGE_LOCAL does not look right (before or after this ticket). If the source tree is clean (so no |
comment:26
Replying to @mkoeppe:
There are many unspeakable things in the older spkg-configure files. This one, at least, I will eventually be drawn to fix as I |
Changed branch from u/mjo/ticket/30128 to |
The sage-env script is run under
/bin/sh
but contains bashisms:This causes a build failure when
/bin/sh
is not bash:The comment at the top of sage-env about using bash features should be removed afterwards. For bonus points, it would be nice if we could add a non-bash shell to one of the CI runs.
CC: @jhpalmieri
Component: build
Author: Michael Orlitzky
Branch/Commit:
554282a
Reviewer: Matthias Koeppe
Issue created by migration from https://trac.sagemath.org/ticket/30128
The text was updated successfully, but these errors were encountered: