Bug 1174137 - rpm: package installation is not transactional
Summary: rpm: package installation is not transactional
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: rawhide
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2014-12-15 08:55 UTC by Florian Weimer
Modified: 2019-12-03 13:14 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2019-12-03 13:14:40 UTC

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Github rpm-software-management rpm issues 967 'None' 'open' 'Rpm leaves untracked files behind on install failure' 2019-12-03 13:14:39 UTC

Description Florian Weimer 2014-12-15 08:55:33 UTC
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.

Comment 1 Fedora End Of Life 2015-11-04 13:18:59 UTC
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'
of '21'.

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.

Comment 2 Jan Kurik 2016-02-24 13:18:03 UTC
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:

Comment 3 Panu Matilainen 2016-10-12 11:03:46 UTC
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.

Comment 4 Panu Matilainen 2019-12-03 13:14:40 UTC
There's nothing Fedora specific here, moving to upstream tracking where it belongs:

Note You need to log in before you can comment on or make changes to this bug.