Description of problem: It's already known that if rpm/yum crashes in the middle of processing a long transaction, you'll have a big mess on your hands with hundreds of packages having both the old and the new version installed at the same time, forcing manual removal of each package's old version. When this happens, all %doc files are going to be removed when the old version of the package is uninstalled, if both the old and the new package have the same version, but different releases. This anomalous behavior can be easily reproduced using rpm -i and rpm -e, as follows. Version-Release number of selected component (if applicable): All versions of rpm, going back many years. How reproducible: Always Steps to Reproduce: 1. echo "foobar" >.../SOURCES/dummy.tar.gz # Need a dummy tarball to build this 2. rpmbuild the following two spec files. 3. You will end up with two packages: bugtest-1-1.%{_arch}.rpm and bugtest-1-2.%{_arch}.rpm 4. Both packages contain the same %doc file: /usr/share/doc/bugtest-1/doc.txt 5. rpm -i bugtest-1-1.*.rpm 6. rpm -i bugtest-1-2.*.rpm # No error, because both packages do not install any conflicting files. In reality, this happens during rpm -U 7. rpm -e bugtest-1-1 Actual results: /usr/share/doc/bugtest-1/doc.txt will be removed by rpm -e bugtest-1-1, even though it is still installed by bugtest-1-2 Expected results: /usr/share/doc/bugtest-1/doc.txt should not be removed. It is still a part of an installed package. Additional info: This anomalous behavior is also observed with locale files (in /usr/share/doc/locale), but I have not yet come up with an easily-reproducible test case.
Created attachment 146069 [details] First spec file
Created attachment 146070 [details] Second spec file
Yep. See #209306 for details. DUPLICATE
FWIW, rpm-4.4.8 (which has removed the skip lists mentioned in #209306) "works" $ sudo rpm -ivh bugtest-1-1.i686.rpm Preparing... ########################################### [100%] 1:bugtest ########################################### [100%] $ sudo rpm -ivh bugtest-1-2.i686.rpm Preparing... ########################################### [100%] 1:bugtest ########################################### [100%] $ sudo rpm -e bugtest-1-1 $ rpm -Vv bugtest ........ /usr/share/doc/bugtest-1 ........ d /usr/share/doc/bugtest-1/doc.txt $ ls -al /usr/share/doc/bugtest-1/ total 36 drwxr-xr-x 2 root root 4096 2007-01-21 21:23 . drwxr-xr-x 759 root root 24576 2007-01-21 21:23 .. -rw-r--r-- 1 root root 4 2007-01-21 21:17 doc.txt So UPSTREAM or DUPLICATE, your call. Thanks for the reproducer.
Performance degradation related to this problem is likely fixed in rpm cvs, will be in rpm-4.4.9-0.3 when built. UPSTREAM
*** This bug has been marked as a duplicate of 140055 ***