Rpm totally fails to clean up after itself in case something goes wrong during 
installation, including at least:

* If unpacking encounters any errors, rpm will leave untracked, partially 
installed junk behind on disk
* In case db addition fails, we might leave the entire package contents on the 
disk just as if it was installed correctly but there's no trace of it in the db

It's not possible to make this all truly atomic, but we should at least 
house-train rpm:
- unpack and apply permissions to all files before renaming to position
- clean up in case of failure at any step in the above
- to be able to revert at any point, we'd to rename old files to temporary 
suffix before overwriting
- reverting from db is easier than filesystem

The above has plugin API considerations, as the current users expect to process 
and "commit" files one by one. This is also the major blocker for making the 
plugin API public: we don't want to do that as long as there's a major change 
of operation ahead.

This is a long-standing major bug in rpm, one of the multiple downstream 
reports being https://bugzilla.redhat.com/show_bug.cgi?id=1174137

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/967
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to