Hi Konrad,
please *never* remove the ML from the communication when discussion was
posted.
On 4/13/26 13:34,
konrad....@gmail.com wrote:
> Hello Stefano,
>
>> -----Original Message-----
>> The central solution is an overwrite without checking why we get this
>> and won't be merged.
>
> I understand. I will try to recreate the problem later this week.
>
>> You are not answering the question. These two patches try to add a
>> feature that is already realized in a better and per SWU way. Again:
>> why is this not done with post-failure scripts in the SWU instead of
>> rely to psot-update scripts that are outside in the running software ?
>
> Hmm, there seems to be some miscommunication.
Maybe.
>
> Is your question
> "why is this not done with post-failure scripts in the SWU,
> as these are thought for this purpose?", where "this"
> is "Still work if called repeatedly, i.e.,
> don't do the FAILURE action again"? (If not, see below...)
>
> If the core were changed to produce multiple FAILURE messages
> and swupdate-progress were not adjusted accordingly, swupdate-progress
> would call the post-failure script multiple times. The post-failure
> scripts are user defined and outside of SWUpdate's purview,
> so requiring them to be idempotent would place a new burden on
> SWUpdate's users. This would be a -- completely unnecessary --
> backwards-incompatible change, at least in my mind.
No, the misunderstanding is going on.
You want with a monitoring application (that should just monitor and not
be active in the update) use swupdate-progress to execute restore
scripts in case of FAILURE.
I am telling you that this should be part of the SWU, that means in the
SWU (sw-description) you add a section:
scripts:(
{
filename=<...>;
type = "postfailure";
data = ".....";
},
< multiple post-failure scripts allowed>
}
They will rollback (if required) in case of failure and it is the
release manager (or integrator or whatever) to decide how it is done.
>
> It would be poor engineering as well, since the script would have to record
> the fact that it has been called already in a persistent location
> somewhere (e.g. a file), and remember to clear this location at certain state transitions,
> whereas we here just use a local variable on the stack.
>
You are not getting the point.
>
> Upon re-reading:
> I don't understand what you mean with "why is this not with post-failure
> scripts in the SWU instead of rely on ... outside in the running software".
In fact, there is a misunderstanding. I hope it is clearer now.
>
> My application does not use post-failure scripts at all, I'm attaching to the lua bindings
> of the progress API.
The fact that an update is successful or not should be part of the
release itself, that means it should be embedded in the SWU. That means
also that you do not need to roll out new scripts in case they are
changed (that means update of swupdate-progress and related scripts),
because this is part of the release itself that remains self contained.
> I am trying to make that API a little bit easier to use while preserving
> the existing interface to the post script of tools/swupate-progress.
>
Best regards,
Stefano Babic