Bug 251345

Summary: Installing/removing multiple versions of the same packages can silently overwrite/delete files
Product: [Fedora] Fedora Reporter: Robert Clark <robert3>
Component: rpmAssignee: Panu Matilainen <pmatilai>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 7   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-08-13 06:09:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Specfile 1 for test case
none
Specfile 2 for test case none

Description Robert Clark 2007-08-08 14:54:07 UTC
Installing a second version of the same package can lead to the first version's
files being silently overwritten instead of throwing up an error about
conflicting files.

I'll attach my test-case specfiles, but the steps to reproduce it are:

[root@rutabaga ~]# rpm -q test
package test is not installed
[root@rutabaga ~]# rpm -i test-1-1.i386.rpm 
[root@rutabaga ~]# rpm -V test-1-1
[root@rutabaga ~]# rpm -i test-2-1.i386.rpm 
[root@rutabaga ~]# rpm -V test-2-1
[root@rutabaga ~]# rpm -V test-1-1
..5....T   /lib/modules/test/test.ko

At this point, the file from test-1-1 has been overwritten by the one from
test-2-1. Furthermore:

[root@rutabaga ~]# rpm -e test-1-1
[root@rutabaga ~]# rpm -V test-2-1
missing     /lib/modules/test/test.ko

Removing the old version now causes the new one's file to be removed leading to
much breakage.

This is with the latest F7 packages (rpm-4.4.2-46.fc7), although I've also seen
the same behaviour on RHEL4.5.

Comment 1 Robert Clark 2007-08-08 14:57:23 UTC
Created attachment 160909 [details]
Specfile 1 for test case

Attaching first test-case specfile.

Comment 2 Robert Clark 2007-08-08 15:01:11 UTC
Created attachment 160910 [details]
Specfile 2 for test case

Attaching second test-case specfile.

Comment 3 Panu Matilainen 2007-08-13 06:09:04 UTC
Yet more skipDir caused breakage... (yes, this really is a duplicate even if the
symptoms are quite different)

*** This bug has been marked as a duplicate of 247749 ***