Jonathan Edwards wrote: > > On Nov 20, 2008, at 3:02 PM, Shawn Walker wrote: > >> Jonathan Edwards wrote: >>> On Nov 19, 2008, at 7:39 PM, Bart Smaalders wrote: >>>> Ed McKnight wrote: >>>>> Suggestion: IPS to implement a package attribute, 'metapackage=true,' >>>>> which would mean that the contained dependencies would be treated as >>>>> reversed during uninstall, thus enabling the dependencies both to be >>>>> automatically installed and uninstalled. Maybe there should be >>>>> enforcement that nothing other than dependencies are contained, >>>>> but I'm >>>>> not sure it's necessary. >>>>> >>>> We've talked about this; it's probably actually an attribute of the >>>> dependency or a different type of dependency rather than an attribute >>>> of the containing package. >>>> >>>> Some of this is waiting on our completion of capturing user intent, >>>> for the following reason: >>>> >>>> pkg install foo >>>> pkg install bar, which has a "meta-dependency" on foo >>>> pkg uninstall bar >>>> >>>> should not uninstall foo, whereas in the case of: >>>> >>>> pkg install bar, which has a "meta-dependency" on foo >>>> pkg uninstall bar >>>> >>>> it should... we cannot do this correctly w/o recording user intent. >>> how about something like: >>> pkg uninstall -r foo >> >> We already have -r. Are you saying it should change somehow, or are >> you suggesting that's what someone should use? > > > okay - so if we have recursive uninstall, i'm not so sure i understand > what the particular problem is .. in other words, if we just view > metapackages (or i've always preferred metaclusters) as a top node > package that includes require dependent packages then i think you've > already got your mechanism for uninstalling clusters and forcing with > the recursive if the package wasn't installed as part of the metacluster > (perhaps a family tag to denote) > > and sorry - i was reading the above example backwards (late nights) .. > so in the above example you've really got a metacluster "bar" and > package "foo" which is part of the metacluster: > > case #1: > - pkg foo is already installed on the system > - you install metacluster bar > pkg uninstall bar <- won't uninstall foo
Ah, but what would it uninstall? Would it uninstall the packages that are part of "bar", or will it uninstall the packages that are part of bar and any dependencies we had to install, and any dependencies for them, etc. > pkg uninstall -r bar <- will uninstall foo This is a gray area; see above. For example, I sincerely doubt that if the administrator had "Apache 2" installed, and then later installed "foo" (which Apache is a dependency or part of) and then used "uninstall -r foo" that they would want Apache automatically removed, because Apache was installed by itself and not ever as part of foo. However, I could also see someone saying, "yes, really remove everything referenced by this package even if it was installed separately." I don't feel comfortable commenting on the rest, other than to say that I'm not so certain about a "family tag". -- Shawn Walker _______________________________________________ pkg-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
