remove-with-deps does not work as it should
Hi, I've been trying this and it is FAST, thank you. One thing that bothers me is not removing dependencies after removing the package that installed them, there is an option in yum "clean_requirements_on_remove" that does this, hope you can implement it, regards
On 18 December 2012 05:57, mustafaa [email protected] wrote:
One thing that bothers me is not removing dependencies after removing the package that installed them, there is an option in yum "clean_requirements_on_remove" that does this, hope you can implement it, regards
Already done, although it's not well tested. Either set clean_requirements_on_remove in /etc/yum.conf or use "zif remove-with-deps foo bar baz"
Richard.
Closing.
If you mean that setting it in /etc/yum.conf makes "yum" remove dependencies, you are right and I know it. But if you mean that setting it in /etc/yum.conf makes "zif" remove dependencies, this is not the case here, however, remove-with-deps works but not as good as yum's, I hope you add it as an option in /etc/zif.conf or inherit it from /etc/yum.conf (and after enough testing make it default, nobody loves unneeded orphan packages).
I also retried these tests (originally by Chris): http://blog.christophersmart.com/2010/11/11/testing-yums-autoremove-orphaned-deps-feature/ and I found:
- In the first case (Single package with dependencies), remove-with-deps works fine.
- In the second case (Packages with shared dependencies), remove-with-deps tries to (force remove) the dependency, thus removing other packages depending on the dependency (e.g. removing vlc wants to remove libcaca even if it is still used by mplayer, thus it removes mplayer too).
- The third case (Removing a package’s dependency) doesn't correctly too.
hope you fix those issues. Regards
On 19 December 2012 05:52, Mustafa Muhammad [email protected] wrote:
- In the second case (Packages with shared dependencies), remove-with-deps tries to (force remove) the dependency, thus removing other packages depending on the dependency (e.g. removing vlc wants to remove libcaca even if it is still used by mplayer, thus it removes mplayer too).
Right, so something like this would expose the bug in "make check":
Install a package that drags in two deps, install another package
that also requires the fist dep, and then remove the first package --
the shared dep should not be removed, nor the second package
config archinfo=i386 clean_requirements_on_remove=1 history_db=/tmp/history.db
local
remote vlc;0:0.1.0-1;i386;meta Requires libcaca libvlc mplayer;0:0.1.0-1;i386;meta Requires libcaca libmplayer libcaca;0:0.1.0-1;i386;meta libvlc;0:0.1.0-1;i386;meta libmplayer;0:0.1.0-1;i386;meta
transaction install vlc install mplayer
result vlc;0:0.1.0-1;i386;meta libcaca;0:0.1.0-1;i386;meta libvlc;0:0.1.0-1;i386;meta mplayer;0:0.1.0-1;i386;meta libmplayer;0:0.1.0-1;i386;meta
----------------------------------------------------------------------
flush
----------------------------------------------------------------------
local vlc;0:0.1.0-1;i386;meta Requires libcaca libvlc mplayer;0:0.1.0-1;i386;meta Requires libcaca libmplayer libcaca;0:0.1.0-1;i386;meta libvlc;0:0.1.0-1;i386;meta libmplayer;0:0.1.0-1;i386;meta
transaction remove vlc
result mplayer;0:0.1.0-1;i386;meta libcaca;0:0.1.0-1;i386;meta libmplayer;0:0.1.0-1;i386;meta
Richard
I've merged this into master:
commit 3f218a02ed7066d7cc48edeb88b80e1723b23e6c Author: Richard Hughes [email protected] Date: Wed Dec 19 13:07:23 2012 +0000
Fix 'zif remove-with-deps' to not remove user-action packages that also require an installed provide
This fixes item 1 and 2 as described in:
http://blog.christophersmart.com/2010/11/11/testing-yums-autoremove-orphaned-deps-feature/
Resolves some of the issues in https://github.com/hughsie/zif/issues/17
Thanks Richard, do you think you can fix the other item too before F18? This would be great.
No, it's quite a lot harder. I'd have to refactor the dep-chain logic to be able to save the state before doing each cycle. It's quite a factorial problem. I've got some test code, but it's not working very well.
Thanks again, I'll keep waiting.
Oops, didn't mean to close that, sorry
Any update on the matter? Before F20?