Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 3979 - Upgrade from directory to file fails
Summary: Upgrade from directory to file fails
Keywords:
Status: CLOSED DUPLICATE of bug 61413
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 6.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
URL:
Whiteboard:
: 13819 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-07-10 15:09 UTC by dharris
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2001-01-09 16:26:26 UTC


Attachments (Terms of Use)

Description dharris 1999-07-10 15:09:30 UTC
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..
http://www.davideous.com/misc/testdirupgrade-1.0-1.src.rpm
http://www.davideous.com/misc/testdirupgrade-2.0-1.src.rpm

Comment 1 Jeff Johnson 2001-01-09 16:26:14 UTC
*** Bug 13819 has been marked as a duplicate of this bug. ***

Comment 2 Jeff Johnson 2002-07-20 18:55:24 UTC
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.