* Shawn Walker ([email protected]) wrote: > On Jun 17, 2009, at 11:58 AM, Shawn Walker wrote: >> On Jun 17, 2009, at 11:43 AM, Glenn Lagasse wrote: >>> * Shawn Walker ([email protected]) wrote: >>>> On Jun 17, 2009, at 9:36 AM, Alexander Eremin wrote: >>>>> Whats about -r' flag for uninstall? >>>> >>>> >>>> That only works for the dependencies. So, for example: >>>> >>>> foo depends on bar >>>> >>>> ..then: >>>> >>>> pkg uninstall -r bar >>>> >>>> Would remove foo and bar. >>>> >>>> But, pkg uninstall -r foo, would only remove foo. >>> >>> Really? That seems totally backwards to me based on all the other >>> package managers I've used that could uninstall dependencies. >>> >>> If I install foo and bar isn't installed then both foo and bar get >>> installed. If I uninstall foo (using -r) and bar isn't a dependency >>> for >>> anything else I'd expect bar to get uninstalled as well. If both foo >>> and bar are installed and I uninstall bar I'd expect a warning saying >>> that bar is a dependency of foo. >>> >>> Why does it work the way you describe? I'm not really seeing the >>> logic. >> >> >> I didn't implement it, so I can't tell you, but that's the way it is >> documented to work, and the way it works: >> >> In the case of uninstall, the -r option will recursively >> uninstall any packages which are dependent on the initial >> package. > > > Before I forget, the other reason would be that, currently, recursion in > the other direction would be fairly useless. > > For example, a recursive removal of Apache would eventually end up > removing all packages on your system. How does one know where to stop > the recursion?
And this is the disconnect I'm seeing. The recursive removal is working backwards to any other system I've ever seen or used. It's operating bottom-up instead of top-down. pkg uninstall -r bar should remove bar and tell me that I'm potentially breaking foo because foo depends on bar. If we add to this, let's add baz as a dependency for bar. Now pkg uninstall -r bar removes bar and baz and tells me that I'm potentially breaking foo. Going backwards (up the chain) just doesn't make any sense to me. Using the current implementation, I have foo which depends on bar and bar which depends on baz. I say pkg uninstall -r bar. So bar and foo get uninstalled, what about baz? How/where does it get uninstalled? Cheers, -- Glenn _______________________________________________ pkg-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
