GSOC09 MacPorts GUI

Juan Germán Castañeda Echevarria juanger at
Fri Jul 17 11:58:51 PDT 2009

Hi Rainer,

Hi Juan,
> first of all you are doing good on this so far. But I also have some
> comments and proposals:
> First of all, the initial loading of the port list takes a long time
> about 1-2 minutes for my installation. How is this list being retrieved?
> Could this be made faster? For example, instead of calling
> registry::installed <portname> on each port, call registry::installed
> once to get a list of all installed ports.

This is something that bugs me too, 1-2 minutes is far too long, in my
computer it takes like 15 seconds but with a testing MacPorts installation,
I think your numbers can be more real life. The framework gets the list
roughly in this way:

   1. performs a mportsearch with the regex ".+".
   2. Transforms the returned list to a Cocoa NSDictionary.
   3. Creates a MPPort object for each entry in the NSDictionary (i.e. one
   per port)
   4. Iterates over the MPPort objects setting their state to Not Installed
   5. performs a registry::installed to get the list of installed ports
   6. Transforms the returned list to a Cocoa NSDictionary
   7. Creates a MPReceipt
   8. Iterates over the MPRecipt objects changing the corresponding MPPort
   object state (Installed, Active, Outdated).

As you can see, It is a very complicated process and I haven't worked in
make it faster. If anybody has some recommendation, I'll be glad to hear it.

> Also there is the possibility to have ports installed which are no
> longer in the index. They can be found with port(1) using the 'obsolete'
> pseudo-port on trunk. I think those would not be shown at all in the
> current port list.

I haven't thought of that, I think I can add it to my TODO and come with a
solution. If I can get the list, It shouldn't be difficult to add.

> Where did you get the icons for the toolbar from? We have to be careful
> about licenses when using icons from Apple.

I got them from the Pallet project. Maybe I should work in new Icons (but
I'm not that good with using Illustrator nor Photoshop)

> On 2009-07-07 21:17 , Juan Germán Castañeda Echevarria wrote:
> >     * Support for non-default MacPorts installation locations. (Via the
> >       Preferences window)
> The whole thing crashes with a "Bus error" if I select a wrong path. It
> should fail more gracefully, please.

Yes, It dies in the Framework. I am planing a solution to this maybe by
looking if there are the necessary files in the directory or by catching
errors in the Framework.

> >     * Basic and Advanced Search (currently can only search by port name
> >       and status, but this is easily extendible)
> After clearing the search field and removing the filter bar, the view is
> still filtered. It should show all ports again.

Oh, sorry, I think that is my fault as the filter bar uses cocoa bindings.
Adding it to the TODO.

> >     * Install, Uninstall, Upgrade port operations in background
> >     * Sync and SelfUpdate in background
> Usually such operations require root privileges. I read the note that it
> does not work yet with such an install. But anyway, do you have plans
> how to handle that for a default /opt/local install?

It should work as the framework can handle the need of root privileges
automatically but currently I am changing some things in the framewok

> Additionally these MPProcesses seem not to be correctly terminated and
> are still around after closing

Yes, that is someting that happened with MPActionTool but I have changed
that. now the processes that perform port operations are in the framework
and terminate after doing their work.

> >     * Progress notifications and cancel command. I’m thinking in having
> >       this as a activity window (Something like Safari’s downloads
> >       window) and allow the user to queue port commands to perform then
> >       sequentially.
> Currently no commands are indicating success or failure, I hope that
> will change with this :-)

Yes, this is something I'm currently working on.

> Rainer

Thanks a lot for your comments and feedback. I'd like to update the binary
version each week to get feedback more easily in what I'm working. I'd
included your comments in the TODO list in I hope to fix some of the issues
you found for the next binary version.

Ash Mac durbatulûk, ash Mac gimbatul, ash Mac thrakatulûk agh burzum-ishi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the macports-dev mailing list