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: 5467
- 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...