os-install between format numbers
Based on a conversation with @rustylynch I realized we now have the manifest format versioned in the file. I was thinking it should be possible now as long as the swupd-client version understands the version number to do operations like os-install across format boundaries. Thoughts?
@bryteise Format numbers can be ambiguous, especially when considering downstream mixes. Currently, you can run swupd os-install on any format when you specify the format number on the command line.
sudo swupd os-install --path $PWD/path -B os-core -V 26000 --format 26
A better solution would be to decouple manifest structure from the format number which can be incremented for a number of reasons.
What John suggested would be the ideal and it's something that we plan to do. But there are other problems that are still problematic in both cases.
Based on a conversation with @rustylynch I realized we now have the manifest format versioned in the file.
I assume you are talking about the MoM. We have the format in the MoM and in the file format, but can we assume that if we are in a different format? If I have swupd build on format30 and I want to install clear in format 31, how can I know that the MoM hasn't changed? Or even if we aren't using manifests anymore? The safest way is still to install latest in same format and update.
I was thinking it should be possible now as long as the swupd-client version understands the version number to do operations like os-install across format boundaries. Thoughts?
We can have a swupd released on format 30 and we could have some logic in it to say that it supports format from 26 to 30, or something like that. But how can we predict that it will support the format 31? We don't know in advance if format 31 will have any breaking changes or not. And this problem is still going to happen if we use any other kind of manifest versioning. The problem of cross format os-installs is not the fact that swupd doesn't know information about the format. It's a problem on the definition of a format. If the metadata format can change in a format bump we can't cross it safely. If we had a Manifest versioning that is independent than the format number, like John suggested, we could have os-install across format boundaries, but not os-installs across manifest version boundaries.
sudo swupd os-install --path $PWD/path -B os-core -V 26000 --format 26
As far as I remember there's a way to force an os-install across format boundaries. The only problem is that it can fail.