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
*** Bug 13819 has been marked as a duplicate of this bug. ***
This is a variant of #61413 *** This bug has been marked as a duplicate of 61413 ***