Bug 119372

Summary: rpm -e should _not_ remove files that are shared with the newer version of the same package.
Product: [Fedora] Fedora Reporter: Aleksey Nogin <aleksey>
Component: rpmAssignee: Paul Nasrat <nobody+pnasrat>
Status: CLOSED DUPLICATE QA Contact: Mike McLean <mikem>
Severity: high Docs Contact:
Priority: medium    
Version: rawhideCC: barryn, gczarcinski, goemon, joshuadfranklin, nmiell, tmraz
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: 2005-11-28 23:31:47 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:
Bug Depends On: 140055    
Bug Blocks:    

Description Aleksey Nogin 2004-03-29 22:15:17 UTC
If there are two versions of a package installed and they share files,
then removing one of the versions causes the shared files to be removed.

To reproduce:
1) try "rpm -Uvh" in a situation where the %postun script of the old
package would fail.
2) Observe that "rpm -q <package-name>" shows two versions of the package.
3) Observe that "rpm -V <package-name-new-version>" shows that the
package is correct.
4) Fix the problem that caused the postun script to fail
5) Run "rpm -e <package-name-old-version>"
6) Run "rpm -V <package-name>"

Expected: no inconsistencies reported, as "rpm -e" should be smart
enough not to break other installed packages.

Actual: Some (all?) files included in both packages (for example,
documentation files) will be reported as missing.

Comment 1 alvin thompson 2004-04-09 19:34:56 UTC
this may be related to bug 120519, which i just opened

Comment 2 Nicholas Miell 2004-10-11 05:08:57 UTC
This is also a problem on biarch systems -- removing one of the
installed architectures of a package will also remove the files shared
with other installed architectures.

Comment 3 Nicholas Miell 2004-10-11 05:15:06 UTC
The following is an example of the problem, in case I wasn't too clear
in my explanation:

[root@entropy ~]# rpm -q rpm
rpm-4.3.2-11
[root@entropy ~]# ls nc*
nc-1.10-22.i386.rpm  nc-1.10-22.x86_64.rpm
[root@entropy ~]# rpm -ivh nc-1.10-22.*
Preparing...               
########################################### [100%]
   1:nc                    
########################################### [ 50%]
   2:nc                    
########################################### [100%]
[root@entropy ~]# rpm -V nc
.......T  d /usr/share/man/man1/nc.1.gz
[root@entropy ~]# rpm -e nc.i386
[root@entropy ~]# rpm -V nc
missing     /usr/share/doc/nc-1.10
missing   d /usr/share/doc/nc-1.10/Changelog
missing   d /usr/share/doc/nc-1.10/README
missing     /usr/share/doc/nc-1.10/scripts
missing   d /usr/share/doc/nc-1.10/scripts/README
missing   d /usr/share/doc/nc-1.10/scripts/alta
missing   d /usr/share/doc/nc-1.10/scripts/bsh
missing   d /usr/share/doc/nc-1.10/scripts/dist.sh
missing   d /usr/share/doc/nc-1.10/scripts/irc
missing   d /usr/share/doc/nc-1.10/scripts/iscan
missing   d /usr/share/doc/nc-1.10/scripts/ncp
missing   d /usr/share/doc/nc-1.10/scripts/probe
missing   d /usr/share/doc/nc-1.10/scripts/web
missing   d /usr/share/doc/nc-1.10/scripts/webproxy
missing   d /usr/share/doc/nc-1.10/scripts/webrelay
missing   d /usr/share/doc/nc-1.10/scripts/websearch
.......T  d /usr/share/man/man1/nc.1.gz

Comment 4 Michael Schröder 2004-11-19 15:31:42 UTC
It's because of the skipDirs() call in rpmdb.c. See bugzilla #140055 

Comment 5 Dan Hollis 2005-09-18 12:42:52 UTC
this bug still exists in FC4!

removing lm_sensors.i386 blows away the /usr/share/doc/lm_sensors* of
lm_sensors.x86_64, very annoying.

Comment 6 Paul Nasrat 2005-11-28 23:31:47 UTC
Collapsing to single skipDirs bug

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