Ed McKnight wrote:
> 
> 
> 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?
>>
> 
> Its easy to get this dependency backwards. A metapackage depends upon 
> "content" packages (in the example below, metapackage bar depends upon 
> foo). Installing bar brings along foo. Doing 'pkg uninstall -r bar' 
> removes nothing except bar (unless there are packages installed that 
> depend upon bar.) It will not remove foo. pkg uninstall -r bar will 
> remove packages that depend upon bar, not those that bar depends upon.
> 
> Since we find it convenient to install groups of packages via a handle 
> like a meta-package (or "group package") it seems only logical to 
> provide the same convenience for uninstall (and cruel not to :) I 
> understand that a meta-package describing an operating system won't need 
> to be removed very often, but the products that run under operating 
> systems do have this need. If the packaging system doesn't provide it 
> then the products have to invent it...
> 
> If a product documents that it is to be installed/uninstalled by means 
> of metapackages then intent is fully specified. No?

No.  That's only documentation of the intent of the package creator, not 
of the user.  Making it possible for the package creator to specify 
their intent is only half the problem; ensuring that a dependency of a 
cluster that was already installed doesn't get removed when that cluster 
does is the hard part (to me).

Bart probably has a clearer picture of this though.

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

Reply via email to