--gen-swversions with "installed-directly = true"

71 views
Skip to first unread message

Chris

unread,
Oct 31, 2025, 2:08:22 PMOct 31
to swupdate
I have a sw-description with 2 images that are both "installed-directly = true".  When I try to use --gen-swversions with this .swu, I notice that the swversions file is created at the end of a successful install, but it is empty.  I've check the $? return from swupdate and it's 0 (no errors) and it's definitely not a filesystem/sync/permission issue.  Any help in this matter would be helpful.  

Clément Ramirez (DiyVE)

unread,
Nov 3, 2025, 4:14:25 AMNov 3
to swupdate
Hi Chris,

I think this is linked to the current implementation of the --gen-swversions option.
This issue has already been discovered here [0] and is linked to the fact the versions are not updated when the artifact is marked to be streamed.
A patch fixing this issue has been posted in the mentioned thread.

Have a great day,

[0] https://groups.google.com/g/swupdate/c/uXdoBDB5cpQ/m/-gHbN1z1AQAJ

Sincerely
Clément RAMIREZ

Chris

unread,
Nov 3, 2025, 11:52:07 AMNov 3
to swupdate
Hi Clement,

Sorry, I should have mentioned I tried this patch (I'm running 2024.12.1) and it didn't work (I still get an empty file).  So I thought maybe that patch was not useful since it never got accepted.  Has anyone else tested this patch?

Thanks,
Chris

Mark Deneen

unread,
Nov 3, 2025, 9:36:01 PMNov 3
to swupdate
Hey Chris,

I don't know why the patch wasn't accepted -- I had just assumed that Stefano missed it.  I'll check what version of swupdate I am using, but I can tell you that the patch does work for me. I use it almost daily.

-M

Stefano Babic

unread,
Nov 4, 2025, 1:33:28 AMNov 4
to Mark Deneen, swupdate
Hi Mark,

On 11/4/25 03:36, Mark Deneen wrote:
> Hey Chris,
>
> I don't know why the patch wasn't accepted --

There is not patch...

Patch is not in patchwork, it was not submitted to this ML for review,
and it is must be formally correct (with Signed-off-by, etc.). I go
through patchwork to check if there is something left and open, and if
it is not there, it won't be applied.

Best regards,
Stefano

I had just assumed that
> Stefano missed it.  I'll check what version of swupdate I am using, but
> I can tell you that the patch does work for me. I use it almost daily.
>
> -M
>
> On Monday, November 3, 2025 at 11:52:07 AM UTC-5 Chris wrote:
>
> Hi Clement,
>
> Sorry, I should have mentioned I tried this patch (I'm running
> 2024.12.1) and it didn't work (I still get an empty file).  So I
> thought maybe that patch was not useful since it never got
> accepted.  Has anyone else tested this patch?
>
> Thanks,
> Chris
>
>
> On Monday, November 3, 2025 at 3:14:25 AM UTC-6 Clément Ramirez
> (DiyVE) wrote:
>
> Hi Chris,
>
> I think this is linked to the current implementation of the --
> gen-swversions option.
> This issue has already been discovered here [0] and is linked to
> the fact the versions are not updated when the artifact is
> marked to be streamed.
> A patch fixing this issue has been posted in the mentioned thread.
>
> Have a great day,
>
> [0] https://groups.google.com/g/swupdate/c/uXdoBDB5cpQ/m/-
> gHbN1z1AQAJ <https://groups.google.com/g/swupdate/c/uXdoBDB5cpQ/
> m/-gHbN1z1AQAJ>
>
> Sincerely
> Clément RAMIREZ
>
> Le vendredi 31 octobre 2025 à 19:08:22 UTC+1, Chris a écrit :
>
> I have a sw-description with 2 images that are both
> "installed-directly = true".  When I try to use --gen-
> swversions with this .swu, I notice that the swversions file
> is created at the end of a successful install, but it is
> empty.  I've check the $? return from swupdate and it's 0
> (no errors) and it's definitely not a filesystem/sync/
> permission issue.  Any help in this matter would be helpful.
>
> --
> 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 visit https://groups.google.com/d/msgid/
> swupdate/6e6b1ca8-03a4-4a52-855d-b8ff3f46b2d0n%40googlegroups.com
> <https://groups.google.com/d/msgid/swupdate/6e6b1ca8-03a4-4a52-855d-
> b8ff3f46b2d0n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Mark Deneen

unread,
Nov 4, 2025, 7:06:52 AMNov 4
to swupdate
Right, I mentioned that I could formally submit it if you felt that it was a good thing to submit.  I can try to do it formally when I have time.

Mark Deneen

unread,
Nov 4, 2025, 11:26:36 AMNov 4
to swupdate
Hey Chris,

I am using v2024.05.2 on this particular device.

-M

On Monday, November 3, 2025 at 11:52:07 AM UTC-5 Chris wrote:

Chris

unread,
Nov 4, 2025, 11:43:53 AMNov 4
to swupdate
Hi Mark,

(Hopefully not double posting, I thought I sent this but maybe didn't go through).

I took some time to look at the code (including the patch) and I realized I was misunderstanding what to expect from the --gen-swversions command.  I was expecting the top level "version" attribute in the swdescription to show up in this file.  However, the feature only lists the versions (if specified) for images files.  Since I didn't have any "version" attributes in my two images sections, I was ending up with an empty swversion file.

For anyone in the future reading this that was confused like I was, you need to make sure the sw-description has a "name" and "version" attribute defined in each of the images files you want to see in swversions file.

I'm not sure if having the top-level version makes sense in the swversions as part of this feature.  I will leave that up to the developers to ponder this.

Thanks,
Chris
Reply all
Reply to author
Forward
0 new messages