#203 recursive method to uninstall dependencies from a package

open
nobody
None
5
2006-06-23
2006-06-23
No

Currently, if you remove a package using fink remove
foo, it will only remove foo. Any dependencies (dep1,
dep2, etc) will be left behind (as well as dependencies
that dep2 needed).

Apt-get remove dep1 will remove foo, but it will also
remove bar if it depends on dep1.

In the same way that Fink knows what dependencies to
install when installing foo, it should also know what
dependencies to remove when removing foo. The only
catch would be when bar depends on dep1, and dep1 will
be removed, so dep1 must be left behind, but dep2 which
is only needed by foo should be removed (and dep2-2
which is only needed by dep2 should also be removed).

As the code stands now, if one tries to directly remove
dep1, fink informs the user that foo and bar both
depend on dep1, so it can't be removed, and the user is
dropped back to the prompt. So a method already exists
to 1) traverse dependencies for foo, and 2) prevent
packages needed by others from being removed.

Therefore, a command like 'fink remove --include-deps
foo' should read foo's info, remove it and all its
dependencies (and their dependencies) and deal cleanly
(read skip over) removing any of those packages that
are dependencies for other packages.

Discussion


Log in to post a comment.