* Shawn Walker ([email protected]) wrote:
> On Jun 17, 2009, at 12:32 PM, Glenn Lagasse wrote:
>> Now if I say 'pkg uninstall -r C', I mean uninstall C and any other
>> packages that are installed as dependencies of C.  Ideally, if any of
>
> You may mean C, but the other administrator that specifically installed E 
> may not agree with you ;)
>
> That's were recording user intent comes in.  For example, I think you'd 
> agree that if one administrator installs MySQL and sets up a database, 
> and then later you install amp-dev, but then decide to uninstall -r 
> amp-dev, we shouldn't remove MySQL by default since that would break a 
> possibly very important database :)

Right.  Someone installed MySQL outside of amp-dev.  So in my mind,
recursively uninstalling amp-dev doesn't remove MySQL because MySQL
wasn't installed to satisfy amp-dev's dependencies.  It *may* have been
installed to satisfy amp-dev's dependencies because the operator knew
amp-dev needed it but didn't want to install amp-dev that same day but
since it wasn't installed as part of amp-dev then it doesn't get
automatically removed when I recursively uninstall amp-dev.

>> Do we have any mechanism to track what packages were installed as a
>> dependancy vs separately?  For instance if C requires D and D is
>> already installed when I install C, then if I remove C (recursively)  
>> then
>> D stays installed because I (the user) explicitly installed D (or it's
>> installed as a dependency for some other package).  However,
>> if D isn't already installed when I install C and it's only being
>> installed because it's required by C then it comes out with C (unless
>> I've installed some other package that requires D).
>
>
> We don't have a mechanism yet for recording user intent, bug 1728 will  
> need that, though we do have a way to obtain it from our existing  
> information.

I don't know that I'm convinced that 'user intent' handles the way I
think this should work.  But if it makes recursive uninstall work
'top-down' rather than 'bottom-up' as is currently the case then I think
it probably is sufficient.

Cheers,

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

Reply via email to