Do not create `spkg-*.log`, `spkg-*.time` files
- Clean up after #37391, which used
sage-loggerfor prefixing output; generating the log/time files was a side effect, which has not proven to be useful - Fixes #37887 @jhpalmieri
:memo: Checklist
- [x] The title is concise and informative.
- [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 and checked the documentation preview.
:hourglass: Dependencies
- Depends on #37840 (merged here)
Documentation preview for this PR (built with commit bfb292ae69a4b6955f4302221285dc3c5136a866; changes) is ready! :tada: This preview will update shortly after each push to this PR.
There is some code duplication. Would it make any sense to have a function that would replace each instance like
if [ -f spkg-pipinst ]; then
sage-logger -P spkg-pipinst "$SAGE_SUDO ./spkg-pipinst"
if [ $? -ne 0 ]; then
error_msg "Error running the pipinst script for $PKG_NAME."
exit 1
fi
fi
by a call to a function defined by something like
run_script() {
if [ -f $1 ]; then
sage-logger -P $1 "$SAGE_SUDO ./$1"
if [ $? -ne 0 ]; then
error_msg "Error running the $1 script for $PKG_NAME."
exit 1
fi
fi}
?
(not tested)
I've made it less verbose in a different way, please take a look
It seems that some of spkg-*.log files are generated and some not. Which is which and why?
If any are still generated with this PR, that's a bug. Is this what you observed?
~~Can we test it here, with "CI Fix" tag?~~ We can already see it.
I think there should be some explanation why you introduced the log files and why you think now they are not useful...
I don't have a better explanation than what I wrote in the ticket description: "I used sage-logger for prefixing output; generating the log/time files was a side effect, which has not proven to be useful"
~~You certainly added the logging feature expecting that the logs would be useful.~~ Then now you simply say "which has not proven to be useful". I am curious what happened in the meanwhile...
I looked #37391 again. Right, you didn't add the logging feature. As you said, it is a side-effect of using sage-logger for prefixing. The generated log files are not useful, and hence here you add a feature to turn them off.
OK. I misunderstood the situation. Sorry.
No worries, these are all the right questions to ask!
Thank you!