Hacker News new | past | comments | ask | show | jobs | submit login

- HEADLINE: transactional upgrades and package installs

- DESCRIPTION: This is a feature of the guix package manager. From their website:

"Each invocation is actually a transaction: either the specified operation succeeds, or nothing happens. Thus, if the guix package process is terminated during the transaction, or if a power outage occurs during the transaction, then the user’s profile remains in its previous state, and remains usable."

They also do transactional rollbacks, but I'm not sure how realistic that is for the apt package system.




This is impossible. Debian packages are stateful: They have maintainer scripts that can do stuff, they are inherently non-transactional by design.

Even if you can rollback updates, a lot of the time that's no help - your user data format was upgraded, rendering your data useless (especially for web browsers, which you can't really downgrade).

That said, it's trivial to use file system snapshots. Ubuntu has apt-btrfs-snapshot to do this automatically, but it was never provided in Debian AFAICT.

But even with snapshots, you also need to snapshot user state, not just the installation, otherwise you end up with upgraded incompatible data again.


Fedora/RHEL also has transactional package operations via their package-manager, `dnf`.

One of the reasons I'd prefer not to go back to apt-based distros.


What is the point of being "transactional" if it can't even handle the most trivial failure scenario resiliently?

https://lists.fedoraproject.org/archives/list/[email protected]...


Thanks, I didn't know that.

Does Fedora also have transactional rollbacks?


Yep, all installations and upgrades are transactional, and can be undone or rolled-back transactionally


This works for guix because it doesn't follow FHS (if it's like Nix) which I doubt would ever happen in Debian. The alternative is to namespace via the FS.




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: