Transactional apt would be a great step towards an ever more stable Debian: in my experience, apt breakage happens rather easily: just interrupt apt-get when unpacking or configuring anything. Not a problem for sysops (though transactional apt would probably mean something), but regular desktop users don't open a terminal and issue the commands to fix the problem: their system can't update anymore and they can't install anything.
I've posted a topic on how I transparently fix apt when needed (viewtopic.php?t=161491), but this is not a cross-post! Here I'd like to discuss if apt can evolve to be transactional. Is it as good an idea as I think? Would it be easy to achieve? I can't find anything relevant anywhere about this.
[Discussion] What about making apt transactional?
- dilberts_left_nut
- Administrator
- Posts: 5472
- Joined: 2009-10-05 07:54
- Location: enzed
- Has thanked: 21 times
- Been thanked: 93 times
Re: [Discussion] What about making apt transactional?
Feel free to submit your patch.
AdrianTM wrote:There's no hacker in my grandma...
Re: [Discussion] What about making apt transactional?
I think this would be difficult. The packages contain not only files which are unpacked to some location but also scripts that are called at certain steps and that could do anything. So it would be necessary to save the old state of the file system, apply the installation or update and in case of an error revert the old saved state. That can't be done while other processes are running that could also change the state of the file system since this would also revert these changes.
Maybe this could be done if updates and installations are only done very early after restarting and not while the system is running.
An alternative would be an immutable distribution, but they go much further and the normal way to install programs is using flatpak or snap.
Maybe this could be done if updates and installations are only done very early after restarting and not while the system is running.
An alternative would be an immutable distribution, but they go much further and the normal way to install programs is using flatpak or snap.
Re: [Discussion] What about making apt transactional?
@blackbird Thanks for the insight. Both scenarios would mean a big change in Debian infrastructure, if I understand well. It could only happen if a transactional updates / installations system was considered a must have feature...
Re: [Discussion] What about making apt transactional?
Endless OS, based on Debian, is an "immutable" distribution that does what this post is about. The transactional magic is done through OSTree, apt is just disabled, flatpak is used to install apps.
https://www.endlessos.org/os
Ubuntu Core Desktop and Fedora Atomic Desktop are similar projects.
https://www.endlessos.org/os
Ubuntu Core Desktop and Fedora Atomic Desktop are similar projects.
- pbear
- Posts: 533
- Joined: 2023-08-27 15:05
- Location: San Francisco
- Has thanked: 2 times
- Been thanked: 84 times
Re: [Discussion] What about making apt transactional?
From what I've read, there's approximately zero chance of Debian moving to a container app model. If that's what you're looking for, vote with your feet.
Off topic here, but apropos of the linked prior thread, (a) I almost never run into problems with apt (b) the better solution for the rare case where it goes sideways is either system backup or a snapshot utility like Timeshift.
Off topic here, but apropos of the linked prior thread, (a) I almost never run into problems with apt (b) the better solution for the rare case where it goes sideways is either system backup or a snapshot utility like Timeshift.