Bug 1174137

Summary: rpm: package installation is not transactional
Product: [Fedora] Fedora Reporter: Florian Weimer <fweimer>
Component: rpmAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: jorton, jzeleny, mikhail.v.gavrilov, novyjindrich, packaging-team-maint, pmatilai
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-12-03 13:14:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

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:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora24#Rawhide_Rebase

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:
https://github.com/rpm-software-management/rpm/issues/967