Future MacPorts Ideas

Jeremy Lavergne jeremy at lavergne.gotdns.org
Sun Dec 19 20:06:56 PST 2010

>> Among these are:
>> * what ports have launchd items
>> * what is the launchd status of a given port
>> * can we make this info available in the API
> OK, so launchd is a topic near-and-dear to my heart, but I still have to ask:  What do you propose to do with the information?  That would make it a lot clearer just what format the data should be in, among other things. :)

MacPorts is already capable of stopping and starting its own launchd ports, but it does not know if a given port's launchd is running. Similarly, I don't believe MacPorts actually knows what ports have launchd items without scanning all the portfiles.

Presently there is no automated way to know if a running launchd item is actually from MacPorts, and MacPorts doesn't check the status of ports' installed launchd items.

MacPorts is host to all the necessary information: the mapping between a port and its launchd name. It seems useful to put these pieces together as part of the API, allowing other tools to easily match up a launchd item with a port or quickly query which ports are running.

I would begin by having the launchd file or job name stored in the registry. This would provide the backend for querying by what can be gathered from launchd. Next I'd provide an API call that will check the state of a given port, by using the same field in the registry.

Eventually, these API calls can be presented in Pallet (or a similar tool) as an interface that resembles System Preferences -> Sharing. It would present a list of MacPorts-installed daemons and their current status.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3749 bytes
Desc: not available
URL: <http://lists.macosforge.org/pipermail/macports-dev/attachments/20101219/802a7f93/attachment.bin>

More information about the macports-dev mailing list