diff mbox series

doc: extend pre install script

Message ID 20240215151716.115550-1-stefano.babic@swupdate.org
State Accepted
Delegated to: Stefano Babic
Headers show
Series doc: extend pre install script | expand

Commit Message

Stefano Babic Feb. 15, 2024, 3:17 p.m. UTC
Explain why pre- install scripts cannot be always executed before
installing.

Signed-off-by: Stefano Babic <stefano.babic@swupdate.org>
---
 doc/source/sw-description.rst | 8 ++++++++
 1 file changed, 8 insertions(+)

--
2.34.1

Comments

Michael Glembotzki Feb. 16, 2024, 10:03 a.m. UTC | #1
Typo: s*s*oon

Stefano Babic schrieb am Donnerstag, 15. Februar 2024 um 16:17:19 UTC+1:

> Explain why pre- install scripts cannot be always executed before
> installing.
>
> Signed-off-by: Stefano Babic <stefan...@swupdate.org>
> ---
> doc/source/sw-description.rst | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/doc/source/sw-description.rst b/doc/source/sw-description.rst
> index 85932198..6fe2d05a 100644
> --- a/doc/source/sw-description.rst
> +++ b/doc/source/sw-description.rst
> @@ -829,6 +829,14 @@ SWUpdate scans for all scripts and calls them before 
> installing the images.
> If the data attribute is defined, its value is passed as the last 
> argument(s)
> to the script.
>
> +Note that cannot be ensured that preinstall scripts run before an 
> artifact is
> +installed in streaming mode. In fact, if streaming is activated, the 
> artifact must
> +be installed as ssoon as it is received from network because there is no 
> temporary
> +copy. Because there is no fix order in the SWU, an artifact can be packed 
> before any
> +script in the SWU. The right way is to write an "embedded-script" in Lua 
> inside
> +sw-description: because it becomes part of sw-description, it runs when 
> sw-description is
> +parsed and before any handler runs, even before a partition handler.
> +
> postinstall
> ...........
>
> --
> 2.34.1
>
>
Stefano Babic Feb. 16, 2024, 10:07 a.m. UTC | #2
On 16.02.24 11:03, Michael Glembotzki wrote:
> Typo: s*s*oon
>

Thanks, fixed !

Best regards,
Stefano

> Stefano Babic schrieb am Donnerstag, 15. Februar 2024 um 16:17:19 UTC+1:
>
>     Explain why pre- install scripts cannot be always executed before
>     installing.
>
>     Signed-off-by: Stefano Babic <stefan...@swupdate.org>
>     ---
>     doc/source/sw-description.rst | 8 ++++++++
>     1 file changed, 8 insertions(+)
>
>     diff --git a/doc/source/sw-description.rst
>     b/doc/source/sw-description.rst
>     index 85932198..6fe2d05a 100644
>     --- a/doc/source/sw-description.rst
>     +++ b/doc/source/sw-description.rst
>     @@ -829,6 +829,14 @@ SWUpdate scans for all scripts and calls them
>     before installing the images.
>     If the data attribute is defined, its value is passed as the last
>     argument(s)
>     to the script.
>
>     +Note that cannot be ensured that preinstall scripts run before an
>     artifact is
>     +installed in streaming mode. In fact, if streaming is activated,
>     the artifact must
>     +be installed as ssoon as it is received from network because there
>     is no temporary
>     +copy. Because there is no fix order in the SWU, an artifact can be
>     packed before any
>     +script in the SWU. The right way is to write an "embedded-script"
>     in Lua inside
>     +sw-description: because it becomes part of sw-description, it runs
>     when sw-description is
>     +parsed and before any handler runs, even before a partition handler.
>     +
>     postinstall
>     ...........
>
>     --
>     2.34.1
>
> --
> 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+unsubscribe@googlegroups.com
> <mailto:swupdate+unsubscribe@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/swupdate/9e8717d7-3065-4920-ac6e-52c009a9453en%40googlegroups.com <https://groups.google.com/d/msgid/swupdate/9e8717d7-3065-4920-ac6e-52c009a9453en%40googlegroups.com?utm_medium=email&utm_source=footer>.
diff mbox series

Patch

diff --git a/doc/source/sw-description.rst b/doc/source/sw-description.rst
index 85932198..6fe2d05a 100644
--- a/doc/source/sw-description.rst
+++ b/doc/source/sw-description.rst
@@ -829,6 +829,14 @@  SWUpdate scans for all scripts and calls them before installing the images.
 If the data attribute is defined, its value is passed as the last argument(s)
 to the script.

+Note that cannot be ensured that preinstall scripts run before an artifact is
+installed in streaming mode. In fact, if streaming is activated, the artifact must
+be installed as ssoon as it is received from network because there is no temporary
+copy. Because there is no fix order in the SWU, an artifact can be packed before any
+script in the SWU. The right way is to write an "embedded-script" in Lua inside
+sw-description: because it becomes part of sw-description, it runs when sw-description is
+parsed and before any handler runs, even before a partition handler.
+
 postinstall
 ...........