GSOC09 MacPorts GUI

Juan Germán Castañeda Echevarria juanger at
Tue Jul 7 12:17:01 PDT 2009

Hi everyone,

I’ve been very busy these days working in the GUI, I’ve learnt a lot of
things and first of all I want to thank my mentor, Georg Armah, for teaching
me a lot of things and being so patient with me. Also I’d like to thank all
the other mentors that have helped me on IRC (I should do that more!).
Current Status

Now is the time to introduce you my work. I’ve done the first version of the
MacPorts GUI application and this is what I have:

   - Support for non-default MacPorts installation locations. (Via the
   Preferences window)
   - Basic and Advanced Search (currently can only search by port name and
   status, but this is easily extendible)
   - Install, Uninstall, Upgrade port operations in background
   - Sync and SelfUpdate in background

What doesn’t work:

   - Status field in ports table doesn’t change after install, uninstall and

What still needs to be implemented:

   - Make the Framework use a separate process to perform port commands (see
   the Problems section below)
   - Port info. This will be displayed like a quick look window.
   - 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.


To install it from source, you only have to checkout the gsoc09-gui branch,
and build the MPGUI Xcode project with the Debug-InstallMacPorts

svn co

That will build the MacPorts.framework, a MacPorts 1.8 unprivileged
installation and selfupdate it.

I also have included a binary version that should work out of the box. To
make it work I embedded the Framework in the application bundle but we have
planned that the Framework will be installed separately form the application
and will live in a Frameworks directory (in /Library or the per user

The first time the application is run, the preferences window will come out
and you should set the Tcl installation path. Since the GUI is tested with
MacPorts 1.8, you can set it to the macports1.8/Library/Tcl directory
created in the build directory if you built it from source. If you’re using
the binary version you can install an unprivileged macports (from trunk),
selfupdate it and test with it or use your /Library/Tcl installation (this
will work partially).


Since I'm having problems with my internet connection I haven't tested it
thoroughly, so If you encounter any problem, please let me know.

The main problem has been the multithreaded implementation because for some
reason (it is very difficult to debug) the destroot phase was interrupted
and the thread died when installing some ports (expat, libiconv, pngcrush,
…) that use xinstall with the ‘-W’ flag. After doing some tests we found
that when the port command was run in another process rather than in a
secondary thread, it was smoothly completed.

Then we opted to create a separate process to handle port commands and made
the GUI to communicate with it via distributed objects messaging. This is
the version you’ll test.

Currently I’m working into getting that separate process to be part of the
Framework and also make it send notifications back to the Framework to know
the progress of the port command being run. This way it will be more
transparent to the client (in this case the GUI, but it could be something
else) and the GUI implementation will be simpler.
Final thoughts

I hope to get a lot of feedback from you regarding the interface design and
also about how it is working now. I’m working to get a new version of the
Framework with the changes I explained in previous paragraphs by the
beginning of the next week.
Ash Mac durbatulûk, ash Mac gimbatul, ash Mac thrakatulûk agh burzum-ishi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Type: application/zip
Size: 225097 bytes
Desc: not available
URL: <>

More information about the macports-dev mailing list