While trying the reproducer for bug 1173997, I noticed that a failed installation leaves behind files of which RPM does not keep track in any way:
$ sudo rpm -i test/data/kphotobymail-0.4.1-11.fc18.noarch.rpm --nodeps
[sudo] password for fweimer:
warning: test/data/kphotobymail-0.4.1-11.fc18.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID de7f38bd: NOKEY
error: unpacking of archive failed on file /usr/lib/python2.7/site-packages/Kphotobymail/EXIF.pyc;548ea1b9: cpio: Digest mismatch
error: kphotobymail-0.4.1-11.fc18.noarch: install failed
$ rpm -qf /etc/kphotobymail.data
file /etc/kphotobymail.data is not owned by any package
This is rather unexpected. At least in such easy cases, RPM should recover from installation failures.
This message is a reminder that Fedora 21 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 21. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora 'version'
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.
Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 21 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle.
Changing version to '24'.
More information and reason for this action is here:
Adding FutureFeature to avoid timeouting.
Making it truly transactional is just not going to happen, there's no undoing scriptlet actions etc. However I do agree rpm needs to be able to clean up after itself when unpacking fails.
There's nothing Fedora specific here, moving to upstream tracking where it belongs: