distribution icon indicating copy to clipboard operation
distribution copied to clipboard

swupd version confusion

Open tixoi opened this issue 8 months ago • 6 comments

Hello, please take a look at this system prompt: user@server~ $ swupd check-update Current OS version: 43150 Latest server version: 43280 There is a new OS version available: 43280 user@server~ $ sudo swupd update Update started Preparing to update from 43150 to 43200 Downloading packs for: ... Finishing packs extraction... ... Statistics for going from version 43150 to version 43200: Update successful - System updated from version 43150 to version 43200 Update started Preparing to update from 43210 to 43280 Downloading packs (270.98 MB) for: ... Update successful - System updated from version 43210 to version 43280

So, on this server the update was 2 stepped but successful. It was quite unusual to see that update to 43200 successful and sudden next lines start update from 43210.

But my another server is stuck in between and does not update showing almost random version numbers: user@server2~ $ sudo swupd info Distribution: Clear Linux OS Installed version: 43220 Version URL: https://cdn.download.clearlinux.org/update Content URL: https://cdn.download.clearlinux.org/update user@server2~ $ sudo swupd check-update Current OS version: 43220 Latest server version: 43280 There is a new OS version available: 43280 user@server~ $ sudo swupd update Update started Version on server (43200) is not newer than system version (43220) Update complete - System already up-to-date at version 43220

The problem is that the local version (43220) is treated as being even newer than the one on the update server (43200). Why the version on the update server is considered as 43200 instead of 43280? Can I fix it somehow?

thank you, tixoi

tixoi avatar Apr 22 '25 19:04 tixoi

perhaps you can try sudo swupd repair if you haven't already

K1ngfish3r avatar Apr 22 '25 19:04 K1ngfish3r

Thank you, but it doesn't help. By the way, 'sudo swupd clear' doesn't too.

CitroenXM avatar Apr 22 '25 19:04 CitroenXM

The version update from 43150 to 43280 crossed a format bump line. For those cases the system must first update to the new format (43210) which is also 43200 from the old format with different metadata swupd uses.

As for your system that isn't updating, that looks like it got into a really bad state but I'm not sure what the state is. Could you paste the output for swupd --version (I'd also be interested to know what swupd diagnose shows). It looks like somehow it is trying to use the old format (latest version 43200) rather than the current format (latest version 43280). Any change you passed swupd update a -F option at some point? Either way I think we can fix it but let me know the output for the above commands first.

bryteise avatar Apr 22 '25 22:04 bryteise

user@server~ $ swupd --version swupd-client 6.1.0 Copyright (C) 2012-2019 Intel Corporation

Compile-time options: +BZIP2 +SIGVERIFY -COVERAGE -BSDTAR -XATTRS -TAR_SELINUX +STATELESS +THIRDPARTY -DEBUG_MODE -FORCE_TARTAR Compile-time configuration: mount point / state directory /var/lib/swupd bundles directory /usr/share/clear/bundles certificate path /usr/share/clear/update-ca/Swupd_Root.pem fallback certificate path /usr/share/ca-certs/.prebuilt-store/anchors config file path /usr/share/defaults/swupd:/run/swupd:/etc/swupd systemd unitdir /usr/lib/systemd/system content URL https://cdn.download.clearlinux.org/update/ version URL https://cdn.download.clearlinux.org/update/ format ID 41 build number 403 pre-update hook
post-update hook /usr/bin/update-helper

CitroenXM avatar Apr 22 '25 22:04 CitroenXM

user@server~ $ sudo swupd diagnose Diagnosing version 43220 Downloading missing manifests...

Checking for missing files [100%]

Checking for corrupt files [100%]

Checking for extraneous files [100%]

Inspected 431221 files

Diagnose successful

CitroenXM avatar Apr 22 '25 23:04 CitroenXM

Oh actually 43220 isn't a version we set as released (it had some issues, including having the format used to identify the version to update to being wrong). I don't know how your system updated to that version but if you run swupd update -F 41 it should get you out of your current state.

bryteise avatar Apr 22 '25 23:04 bryteise