Hi Esad,
On 30.11.22 15:10, esad ergül wrote:
> Hi Stefano,
>
> when I use the archive handler to update the system, I always have to
> remove the content of the target partiton before.
More or less, the archive handler is thought to install in an empty
path, not to overwrite an existing one. In that case, it is difficult to
manage files to remove.
> Otherwise I always get
> the error "ERROR : archive_write_data_block(), Write failed for ...".
> Is there a property in SWUpdate that cleans the target partition
> before the installtion.
Not yet, but I see the use case. We could add an additional flag (near
create-destination) to remove old data before installing.
This is wanted to still track that an update ran, but it was not
completed with success. Anyway, recovery_status is used in case of
single-copy: we should *never* start again the software if an update was
started and not completed, independently if it was interrupted or
failed. The SW on the device is partial, maybe broken, with unknown
side-effect.
In case of A/B, the variable to be checked is "ustate" (default). It
will be set to ok, running and failed, according to the status. After a
SWUpdate run, "in progress" (ustate == 7) is replaced by STATE_INSTALLED
(ok, 1) or STATE_FAILED (failed, 3). This should be evaluated by
bootloader and / or your startup scripts.
> In my opinion this variable should be removed if the
> installation is successful or not.
Not really. If you have a single-copy strategy, until the variable is
not dropped, we haven't a working production software. This variable is
reset *only* after a successful update.
> If the variable is present on the
> environment, I think that the last update attempt was interrupted (e.g.
> because of a power interruption).
If you have A/B, you should ignore recovery_status and check for ustate.
Best regards,
Stefano Babic
>
> Best regards,
> Esad Ergül
>
> --
> You received this message because you are subscribed to the Google
> Groups "swupdate" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
swupdate+u...@googlegroups.com
> <mailto:
swupdate+u...@googlegroups.com>.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/swupdate/da00c38b-b981-4b9f-8a0a-b166ad10d0bcn%40googlegroups.com <
https://groups.google.com/d/msgid/swupdate/da00c38b-b981-4b9f-8a0a-b166ad10d0bcn%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone:
+49-8142-66989-53 Fax:
+49-8142-66989-80 Email:
sba...@denx.de
=====================================================================