On Thu, Sep 28, 2006 at 06:37:18PM +0200, Marc Espie wrote:
> > And of course there are common situations that neither approach handles
> > very well. If I install openldap-server it will install openldap-client
> > as a dependancy. If I later uninstall openldap-server I may need to keep
> > openldap-client. Or not. So deleting package dependancies should not be
> > fully automated.
> 
> Good, you're on the right direction.
> 
> > Perhaps in addition to pkg_add tagging as above, there could be a way to
> > manually tag packages as explicity installed...
> 
> Go on, think a bit more, and you'll have the full design I just *sketched*
> overhead... ;-)

I don't get how tagging will help keeping your package list as small as
possible. Let me give an example:

We have 2 packages, Y and Z that were explicitly installed and are
tagged accordingly. Y has A, B and C as dependencies. Z has C, D and E
as dependencies. The dependencies of course are not tagged, right? Or if
they do get marked they get a dependency tag(redundant). Now, as far as
I understood you want to achieve the following. If you want to uninstall
Y you want to keep any dependencies that were explicitly installed. But,
what about A, B and C? They are not tagged as explicitly installed. Which
means that either you won't delete any of them, or delete all of them and
break the installation of Z since C is going to be missing. Please give
me an example of your tagging methodology/plan so we can get an overview
of the functionality you have in mind.

Thinking of it a bit more, here is a potential solution. You install C
which is a dependency of Y. C is marked as "explicitly installed". Later
on, you install Y and it is also marked as explicitly installed. A and B
are installed as dependencies. Now, you decide to remove Y with
pkg_delete(1). It should get the list of dependencies, A, B and C,
remove the ones that are marked as explicitly installed, thus removing C
from the dependency list, and then uninstalling the ones that are not
needed from any other package currently installed on the system, that is
A and B. How about that?

-- 
Sideris Michael
http://black.daemons.gr/msid/

Reply via email to