A question for install sequence

1 view
Skip to first unread message

kaijing wang

unread,
5:58 AM (14 hours ago) 5:58 AM
to swupdate

Hello,

I have a question I would like to consult with you. In my sw-description, I need to install three images, and I need to execute preinstall and postinstall scripts in sequence before and after installing each image. Here is an example of the sequence I hope to achieve:

  1. preinstall1
  2. image1
  3. postinstall1
  4. preinstall2
  5. image2
  6. postinstall2
  7. preinstall3 ...

Is there currently a way to meet this requirement?

Thank you.

Stefano Babic

unread,
6:06 AM (14 hours ago) 6:06 AM
to kaijing wang, swupdate
On 03.07.24 11:20, kaijing wang wrote:
> Hello,
>
> I have a question I would like to consult with you. In my
> sw-description, I need to install three images, and I need to execute
> preinstall and postinstall scripts in sequence before and after
> installing each image. Here is an example of the sequence I hope to achieve:
>
> 1. preinstall1
> 2. image1
> 3. postinstall1
> 4. preinstall2
> 5. image2
> 6. postinstall2
> 7. preinstall3 ...
>
> Is there currently a way to meet this requirement?

No.

It was discussed once if a hook per artifact is necessary, but there was
no further plans. In SWUpdate the whole update is atomic, and the
postinstall steps can be done all together after the artifacts are
installed. The list above cannot be implemented, the following is supported:

1. preinstall1 (Lua)
2. preinstall2 (Lua)
3. preinstall3 (Lua)
4. image1
5. image2
6. image3
7. postinstall1 (Lua or shell script)
8. postinstall2 (Lua or shell script)
9. postinstall3 (Lua or shell script)

The order you want is in SWUpdate high discouraged because this
introduces dependencies between the artifacts, that means you need to
run a postinstall(n-1) to install image(n). It is highly suggested that
the order does not matter in the update.

Best regards,
Stefano Babic
Reply all
Reply to author
Forward
0 new messages