Bug 966715
Summary: | Reinstalling a package with rpm -i --excludedocs --replacepkgs does not remove docs. | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Sandro Mani <manisandro> |
Component: | rpm | Assignee: | Packaging Maintenance Team <packaging-team-maint> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 20 | CC: | artem.komisarenko.zultys, ffesti, h.reindl, james.antill, jzeleny, novyjindrich, packaging-team-maint, pmatilai, rvokal |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-06-12 11:52:33 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 1062957, 1071854 |
Description
Sandro Mani
2013-05-23 18:31:17 UTC
the same applies to Fedora 17 and the real interesting question is what happens due a "yum distro-sync" to F18 in the best case installed doc-files of F17 packages are removed and not installed in their F18 version in the worst case they even get not removed if they are no longer in the package "tsflags=nodocs" in /etc/yum.conf it would make virtual infrastructures so much smaller to get rid of docs/manpages and have them only on the admin workstation but not on the whole infrastructure especially in case of full-backups Okay so its only with 'yum reinstall' or 'rpm ---replacepkgs' where this occurs. Since that's the case this is "expected behavior" (known bug if you like): --replacepkgs bypasses most normal update-style paths and leaving orphan files behind in various circumstances is a known issue. Changing --replacepkgs to behave more like a normal update (only to the same version) has been on my todo list for some time now, just hasn't gotten done. Anyway, since its limited to --replacepkgs/reinstall then there are no surprises (to me) involved. This bug appears to have been reported against 'rawhide' during the Fedora 20 development cycle. Changing version to '20'. More information and reason for this action is here: https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora20 *** Bug 1062956 has been marked as a duplicate of this bug. *** BTW note that 'rpm -i' must never remove anything (packages nor files), so the exact reproducer command is not going to behave the way described in "expected results", but leaving orphan files behind is obviously a bug. There are roughly two parts to this: - rpm should refuse an operation which would leave orphan files behind, so -i in such a situation should error out - rpm needs proper reinstall functionality, technically behaving like an update (but to the already installed version) with separate install and erase transaction elements which allows file removals due to changed docs/langs etc policies etc properly handled. thanks for feedback! rm -rf /usr/share/doc/*; rm -rf /usr/share/man/*; yum reinstall filesystem is by the way a workaround to get "tsflags=nodocs" applied in a existing setup This use-case is now fixed upstream by adding a new --reinstall command which properly handles changing file policies and such: [root@localhost rpm]# ./rpm -U nano-2.3.2-4.fc20.x86_64.rpm [root@localhost rpm]# ls /usr/share/doc/nano/ AUTHORS ChangeLog faq.html nanorc.sample README TODO BUGS COPYING INSTALL NEWS THANKS [root@localhost rpm]# ./rpm --reinstall --nodocs nano-2.3.2-4.fc20.x86_64.rpm [root@localhost rpm]# ls /usr/share/doc/nano/ ls: cannot access /usr/share/doc/nano/: No such file or directory [root@localhost rpm]# ./rpm -q --state nano|head -5 normal /etc/nanorc normal /usr/bin/nano normal /usr/bin/rnano not installed /usr/share/doc/nano not installed /usr/share/doc/nano/AUTHORS [root@localhost rpm]# Now I just need to figure what to do about --replacepkgs switch, as its "semantics" are rather peculiar... thank you for feedback This message is a reminder that Fedora 20 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 20. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '20'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 20 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. Moved the considerations about the future of --replacepkgs to http://rpm.org/ticket/893 Closing as the actual problem is fixed. |