On Wed, Jun 17, 2009 at 10:32:50AM -0700, Glenn Lagasse wrote:

> * Danek Duvall ([email protected]) wrote:
>
> > Think of the dependency tree.  From any given package, you can uninstall
> > recursively in either direction.  A simplified example:
> > 
> >                     A     B
> >                      \   /
> >                        C
> >                      /   \
> >                     D     E
> > 
> > That is, A and B are leaf packages, both depending on C, and C depends on
> > both D and E.
> 
> If I say 'pkg uninstall C', I mean uninstall that one package and
> nothing more.  Likewise if I want to uninstall D or E.  Am I breaking a
> package graph, probably.  In that case, let pkg tell me that I'm
> potentially breaking whatever package depends on what I'm removing and
> allow me to change my mind or move on and remove the package.  I may
> even then want to remove the packages that depend on the one I was going
> to remove now that I know about them.

Sure; that's all as implemented now, except that there's no interactivity,
and no way to break the package graph.

> [ ... ]
> Going the other direction, if I want to uninstall D then I'd expect the
> pkg system to warn me that I'm going to potentially break whatever leaf
> packages depend on D.  Uninstalling D with -r doesn't make a lot of
> sense to me.  I don't see working in that direction (backwards).

Let's call that "leafwards" (vs "rootwards"), as everyone seems to orient
their trees differently, so "up" and "down" and "backwards" and "forwards"
are confusing, but I think most people have a common understanding of what
a "leaf package".

> If I were doing that I'd be saying remove D and follow the chain back to
> the packages that depend on it which leads to C and then where do you go?
> Following back to A and B doesn't seem right to me.

Why not?  You've asked that D be removed.  If you remove nothing but it (or
it and the packages it depends on), then you've broken the packages that
depend on it.  You could have a mechanism to force the breakage, but if
you're one of those crazy administrators that likes to have their system in
a supportable state, you'll want to get rid of the packages whose
dependencies will be broken because of this removal.  You could require
that the user explicitly list all the packages leafward of D, but that
could be a huge pain in the ass.

> Do we have any mechanism to track what packages were installed as a
> dependancy vs separately?

No; I think I said earlier that user intent was not implemented.

Danek
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to