Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 13819

Summary: can't upgrade package with symlink in place of directory
Product: [Retired] Red Hat Linux Reporter: Philip Spencer <pspencer>
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED DUPLICATE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-01-09 15:42:12 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:

Description Philip Spencer 2000-07-12 19:39:27 UTC
RPM (both versions 3.0.3 from Redhat 6.1 distribution and 3.0.4 from Redhat
6.2 distribution) will fail to upgrade a package if the new version has a
symlink where the old version had a directory.

Example:

Package foo version 1 has a directory /foo
Package foo version 2 puts its stuff in /bar, and has a symlink /foo ->
/bar for compatibility.

If foo-1.whatever.rpm is installed, "rpm -U foo-2.whatever.rpm" will fail.
With rpm 3.0.4 the error message is "unpacking of archive failed on file
/foo: cpio: unlink failed - Bad file descriptor". Version 3.0.3 gives a
slightly better message, "unpacking of archive failed on file /foo: cpio:
unlink failed - Is a directory".

rpm -e foo followed by rpm -U foo works correctly, but foo cannot be
upgraded from version 1 to version 2 by rpm unless you erase it completely
first.

Comment 1 Jeff Johnson 2000-07-12 19:47:42 UTC
No version of rpm has ever supported the ability to replace a directory with a
symlink. This
problem is starting to be addressed in rpm-4.0, but  ...

I'd suggest you consider some other way to package, because it's gonna be a
while before
rpm can/will support the ability to replace a directory with a symlink.

Comment 2 Jeff Johnson 2001-01-09 15:41:14 UTC
*** Bug 23265 has been marked as a duplicate of this bug. ***

Comment 3 Jeff Johnson 2001-01-09 16:26:27 UTC

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