Opened 6 years ago
Closed 5 years ago
#4846 closed defect (wontfix)
Make sure the Jenkins build script can patch itself
Reported by: | Itms | Owned by: | Itms |
---|---|---|---|
Priority: | Should Have | Milestone: | |
Component: | Build & Packages | Keywords: | |
Cc: | Patch: |
Description (last modified by )
Case in point: building Phab:D1026 failed with
build/jenkins/build-patch.sh: 69: cd: can't cd to build/workspaces/gcc
meaning that the unpatched version of the script was still being executed. As far as I know a script that modifies itself keeps track of the current position in the file, so I have to assume the issue comes from the patched code being higher in the file (line 69) than the place where the patching happens (line 102).
I don't see an obvious way to fix this so I'm opening this ticket for tracking future improvements. Suggestions are welcome as well :-)
Change History (5)
comment:1 by , 6 years ago
Description: | modified (diff) |
---|
comment:2 by , 6 years ago
follow-up: 5 comment:4 by , 5 years ago
Is this still needed? I'm unable to find where the script tries to modify itself, or why that would be easier or needed to do something in CI.
comment:5 by , 5 years ago
Cc: | removed |
---|---|
Milestone: | Backlog |
Resolution: | → wontfix |
Status: | assigned → closed |
Replying to Krinkle:
Is this still needed? I'm unable to find where the script tries to modify itself, or why that would be easier or needed to do something in CI.
No, I will close this as wontfix. What I am doing since I manage the CI is that I modify CI scripts manually and version them separately. By the way, I will soon update Phab:D1910 with the latest improvements to the CI.
Bash tries somewhat hard to do that, however self-modifying code is just confusing and creating issues.
One could probably split that file into a few, then only load them when something is actually used. I wouldn't try to make the thing work when it is modified itself, that's just asking for pain.
The alternative would be to manually do the patching in such cases.