Tracking which ports were installed explicitly

Neil neil at voidfx.net
Wed Dec 3 17:44:43 PST 2008


On 3 Dec 2008, at 16:13, Ryan Schmidt wrote:

> Joshua proposed that we should track which ports were installed  
> explicitly (via "sudo port install x") vs. which ports were  
> installed via dependencies.
>
> As he said in the ticket -- http://trac.macports.org/ticket/15260 :
>
>> Keeping track of which ports the user explicitly asked to be  
>> installed, as opposed to those installed only to fulfil  
>> dependencies, would be quite useful. It would be analogous to  
>> Gentoo's 'world'. With this information, we could do things like  
>> uninstall all the ports that are no longer required after  
>> uninstalling some other port.
>>
>> It shouldn't be hard to store the information by adding a magic  
>> port name to the dep_map which depends on all the explicitly- 
>> installed ports. We'd then need code to figure out during install  
>> whether the port was explicitly asked for, and add the dep_map  
>> entry. We'd also need to change the dependents check in uninstall  
>> to not complain if the only dependent is the magic 'world' port.
>>
>>
>
>
> Some discussion has taken place in the ticket and I'd like to move  
> that discussion to this mailing list so we can get more input, and  
> since it's easier to discuss things on the mailing list without  
> cluttering up the ticket. Once we reach a consensus on what should  
> be done, a summary can go into the ticket.
>

I'm not a huge fan of "Me too." posts to mailing lists, but....

>
> I mentioned the parallel with CPAN, which to my recollection has a  
> feature where when you uninstall X, and if it depends on Y, and  
> nothing else depends on Y, it will ask interactively if you want to  
> uninstall Y as well. I pointed out that MacPorts has no  
> interactivity at this time (except if you explicitly enter  
> interactive mode by typing just "port"), and that I value this  
> guarantee of non-interactivity.

Me too.  (I value the non-interactivity.)

>
> Rainer and I liked the idea of a new pseudo-port (I called it  
> "unused"; Rainer called it "orphaned" which is probably better) that  
> you could use to deal with the ports that had been installed as  
> dependencies of things which themselves have already been  
> uninstalled. Then you could do the usual things like "port installed  
> orphaned" or "sudo port uninstall orphaned".
>

This sounds like the right way to go about it to me.



More information about the macports-dev mailing list