-
However, it's been like this for >24 hours. Problem analysisCopying the script and tracing it with
If I try these by hand, the problem is with this one:
So it's actually generating a checksum of the text "Not Found", which clearly doesn't match :-) Secondly, the double dash is suspicious. Looking at the shell debug output again:
The problem is here:
It seems PREBUILT_ARCH is not set, and indeed that's true:
Whereas on another system I have:
Clearly I have a solution now, by adding PREBUILT_ARCH to that file. Suggested improvementsThiss was rather more debugging than I was expecting to do, and I think there are ways this script could be made more robust. Hence I'm making this a "discussion" of possible changes, rather than a specific bugfix. Firstly, I think you should add the
Patch:
With just this change:
That is a more meaningful error than a checksum mismatch. Secondly, the code could be made more robust against a missing PREBUILT_ARCH. Indeed, I see that lines 683-684 already have a check for this:
Unfortunately the corresponding logic is missing from 556. But that's easily added:
Thirdly, scripts can be made more robust in general against unexpected problems with However, that means that all variable expansions which are permitted to be unset need changing - e.g.
I include the full diff below for reference. However, it's quite possible I've not found everything that needs changing - I was looking for instances of
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
First and foremost, thank you for such a well written analysis on this. It’s truly helpful for us to be able to provide quicker and more specific fixes. As far as the issue itself, it looks like you stumbled across an edge case we had missed when writing that bit of the updater script, though there’s probably also an issue with the code in the installer that was supposed to properly update the I agree with your assessments for fixes for the immediate issue as well. If you would be willing to submit a PR with just the change to the curl options and the specific workaround for the missing The larger-scale fixes are a bit trickier. I entirely agree that we need to move in that direction long-term, but there are a number of cases in our scripts where we’re unfortunately relying on a non-zero exit status from a command being silently ignored, so it’s not quite as simple as adding a few extra shell options and fixing up variable expansions. |
Beta Was this translation helpful? Give feedback.
First and foremost, thank you for such a well written analysis on this. It’s truly helpful for us to be able to provide quicker and more specific fixes.
As far as the issue itself, it looks like you stumbled across an edge case we had missed when writing that bit of the updater script, though there’s probably also an issue with the code in the installer that was supposed to properly update the
.install-type
file for old installs that did not have them (I’ll look into that myself at some point later though).I agree with your assessments for fixes for the immediate issue as well. If you would be willing to submit a PR with just the change to the curl options and the specific workaround for…