On Fri, 2022-04-22 at 01:03 -0400, ph h wrote: > > Is this use case scenario, (running a script before building anything) > documented or undocumented? >
I'm not sure if it still is, but running things like "sage -b" and "sage -i" was for 15+ years the documented way to build parts of sage. These days "make build" and "make <package>" should be preferred, precisely because they avoid a chicken and egg problem. But the old way is still supported for now. > > *> "Make $SAGE_LOCAL/bin/sage work again from any directory, in an > environment without SAGE_* variables, following symlinks"* > > Trac #30888: resolve $0 links in src/bin/sage. > > Please advise if this issue can be reproduced with SageMath 9.2 and > earlier only. I think if you revert the commit from #30888 that the issue will return. > > A follow up question is "why 'Copy&Paste' works and 'source' does not? Roughly: you need to know where to source the file from, and that path is relative to the script that wants to do the sourcing, but we don't know where the script doing the sourcing is until we use resolvelinks() on $0. > > What are the problems with the current version of 'resolvelinks', how > should it be factored? None, AFAIK. > What are the problems when just the function is sourced, not the whole > 'sage/src/bin/sage-env' script If you can figure out how to put the function in its own file and manage to source it, there shouldn't be any problems. It's the act of sourcing itself that is problematic. > When it is properly done, can 'Copy&Past' be replaced with 'source'? Maybe =) We've copy/pasted to avoid all of the work involved in determining the answer to this question. -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/c9273b44d5fc213555e9420bf7a84c46b5afb8cc.camel%40orlitzky.com.