swupd version confusion
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
perhaps you can try sudo swupd repair if you haven't already
Thank you, but it doesn't help. By the way, 'sudo swupd clear' doesn't too.
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.
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
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
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.