Hi folks - We’ve had a few articles posted on some journalism websites and we’re happy to see the attention. Generally we (the ClearLinux team) don’t really go out and partake in the discussion on these forums as we … are just too busy handling the ones that we do communicate!
However, we do read the user comments on e.g. Phoronix and Ars Technica (and others, we admit!) and we often see the same questions posed here, and sometimes people writing comments based on inaccurate or incomplete data. It would be too costly to reply everywhere, so, instead, I’m going to try and write up a few of these “FAQ” type of questions and write out a reaction from the Clear team.
We see plenty of users struggle with
swupd. Why couldn’t the ClearLinux team use a packaging mechanism that already exists?
To answer this question, we have to go down to the mechanics of
installation. Most packaging systems that exist are not
update mechanics, and essentially are doing installation all the time. This sounds reasonable because an update is nothing more than the removal of the old, plus the installation of the new content. Everyone can follow that.
What is painfully evident though is the fact that an install of any package, in order to update it, is a waste of bandwidth, disk space, and processing power. In many cases, only small bits of a package change with each update, but most Linux package management systems do not optimize for updates. (Note: things have changed in recent years, please bear in mind that
swupd predates some of them, and
swupd predates Clear Linux even).
Second, classic package management requires that the client device perform full dependency resolution. That’s because you can endlessly combine components, and, components may actually conflict! This makes updating complex and error prone.
Third, most package systems allow you to partially update your system. And those upgrades are not done in a way that is reliable - there is no update control point that you must step through to make sure that going from update 1 to update 5 skips a step in point 3 that is needed to keep everything working.
The list isn’t exhaustive here - I might be forgetting some minor points of friction - after all package management is cause for plenty heated debate :).
We didn’t like any of these problems because they all fundamentally interfere with the stability and long-term usability of the OS. All of these problems cause people to “reinstall” the OS - something we want to avoid. Worse, it causes people to stop updating their OS because they know it will break, and now they are no longer installing security updates.
We opted to not inherit all these problems and it was exactly why
swupd was created to begin with.
- swupd does not allow you to partially upgrade your OS - you can add/remove parts, but only from the same version.
- conflicts are not allowed!
- an update is designed to be close to ideal size - the less changed, the smaller the update. The downloader only needs to fetch the exact parts that changed, at the
difflevel (made using binary deltas).
- dependency management is done by and large at the server level, through the creation of bundle Manifests. That makes applying the updates a simple linear task, without requiring a complex solver.
- updates are safe from any moment in the past and pass through update “checkpoints” to make sure that the system can upgrade through ABI breaking changes without any issues.
Now, this doesn’t mean we’re (overly) critical of other package management systems - each has flaws and design issues, and we haven’t stopped working on
swupd since forever, but it does mean that we’re not trying to invent “the same thing” here -
swupd is fundamentally not compatible or replacing something that didn’t exist. It did something we needed it to do differently than existing solutions.
The other thing in mind is to keep historical perspective: You can, in the case of a Linux OS, not just ask everyone to reinstall because you’re switching package management tooling. We’ve stuck with
swupd and any criticism on the design and its effects is fine, but changing to another system is a serious thing that is going to be prohibitive in most cases.
We intend to keep ClearLinux OS going rolling forward - that’s what
swupd was for and so far it’s done exactly that.
PS: I will update this article as needed. If you have corrections, please share them.
[edit 2/18 mention update checkpoints, changed some wording]