From Bugzilla Helper: User-Agent: Mozilla/5.0 (compatible; Konqueror/3.3; Linux 2.6.7; X11; i686; pl) (KHTML, like Gecko) Description of problem: If I have to packages with same nevr, but package A has 'oldfile' and package B has 'newfile', and I upgrade (-U --force) from package A to package B, than 'oldfile' doesn't get removed but there's no info of it's presence in rpm's database. Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. Download two packages from http://ep09.pld-linux.org/~mmazur/rpm-bug/ 2. rpm -i sometestpkg-old.rpm 3. rpm -U --force sometestpkg-new.rpm 4. ls /bin/oldfile 5. rpm -qf /bin/oldfile Actual Results: 'oldfile' is there but rpm doesn't know about it. Expected Results: 'oldfile' should get removed. Additional info:
It's because rpm only does a "refresh" operation if the nevr is the same, i.e. only the installation phase is done and no erase phase at all. (There's a hack in rpm that removes the old header from the database.)
Most non-intrusive approach to implement the
Most non-intrusive approach to implement the fix is to add one more key to distinguish packages with same NEVR. What do you think about BUILDTIME?
And if BUILDTIME is not sufficient, then SHA1HEADER should be enough.
Created attachment 120124 [details] rpm-owl-compare-digest.diff Proposed implementation, backported from the patch I made for Owl's rpm-4.2.
Fixed in rpm-4.4.3-0.18. Thanks for the patch.