Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 3979 - Upgrade from directory to file fails
Upgrade from directory to file fails
Status: CLOSED DUPLICATE of bug 61413
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
: 13819 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 1999-07-10 11:09 EDT by dharris
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-01-09 11:26:26 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description dharris 1999-07-10 11:09:30 EDT
When a package has a member file which is a directory, and
a later release of the package has that same filename as a
regular file, the upgrade fails trying to unlink the
directory. RPM needs to be a tad smarter about removing the
existing files and directories.

Here's my test:

# rpm -qlp --dump testdirupgrade-1.0-1.i386.rpm
/testfile 1024 931618691  040755 root root 0 0 912 X
# rpm -qlp --dump testdirupgrade-2.0-1.i386.rpm
/testfile 0 931618699 d41d8cd98f00b204e9800998ecf8427e
0100644 root root 0 0 912 X

As you can see, the testdirupgrade-1.0-1 package owns
"/testfile" as a directory, while the testdirupgrade-2.0-1
package owns it as a zero-length file.

Upgrading from directory to file is a problem:

# rpm -i testdirupgrade-1.0-1.i386.rpm
# rpm -U testdirupgrade-2.0-1.i386.rpm
can't unlink /testfile-RPMDELETE: Is a directory

However, upgrading from file to directory is just fine:

# rpm -e testdirupgrade
# rpm -i testdirupgrade-2.0-1.i386.rpm
# rpm -U testdirupgrade-1.0-1.i386.rpm --oldpackage

I've placed the .src.rpm files for these test packages on
up on web for your convenience..
Comment 1 Jeff Johnson 2001-01-09 11:26:14 EST
*** Bug 13819 has been marked as a duplicate of this bug. ***
Comment 2 Jeff Johnson 2002-07-20 14:55:24 EDT
This is a variant of #61413

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

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