Suggested port command enhancement?

Tabitha McNerney tabithamc at gmail.com
Tue Jun 3 04:30:56 PDT 2008


Hello all --
As seen in some recent threads, I think I have mentioned that I'm building a
system that audits and keeps track of MacPorts on some Xserves that I work
on. The port command, as Rainer, et al is quite flexible and can be used to
source a lot of information.

But I believe I have identified a nice future feature of the port command.
What I would like to do is conduct an audit of all ports that have been
fetched (thus in a separate fetch phase) but not yet installed. I can in
fact write a parsing program that looks at:

$prefix/var/macports/build

which contains underscore-substituted names of directories that have not yet
been built, such as:

_opt_local_var_macports_sources_rsync.macports.org_release_ports_textproc_scrollkeeper
>

In a text processing language, its relatively easy to write a parser that
plucks the name from the above filesystem directory structure, such as:

scrollkeeper
>

by chunking the name into pieces based on the underscore "_" as a separator
to split up the name from. However, I discovered there are some ports whose
names also include underscores, like this:

_opt_local_var_macports_sources_rsync.macports.org_release_ports_audio_libsdl_mixer
>

Alas, the final underscore in the above example that separates "lisdl" and
"mixer" --> "libsdl_mixer" in fact does not map to a final directory on the
file system named "mixer" but rather the above maps to:

/opt/local/var/macports/sources/
> rsync.macports.org/release/ports/audio/libsdl_mixer
>

There are ways to work with this situation of course (in my text processing
script I can try to map the build directory name to a fully path name) but
considering that some ports have underscores in their names (and who knows,
maybe many underscores in the future?), it would be really neat if the port
command in the future could offer a feature to just return a list of port
names who have only been fetched but not installed yet. Maybe, in fact, it
might be nice for port to be able to audit each phase of ports all the way
from fetch to installed in the steps along the way?

Hopefully this is an inspirational idea for advancing MacPorts?

Thanks,

T.M.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-users/attachments/20080603/86f0cb04/attachment.htm 


More information about the macports-users mailing list