port notes
Scott Haneda
talklists at newgeo.com
Sat May 1 12:27:28 PDT 2010
I briefly asked about "notes" in Portfiles a while back, and figured that since I am working on a port edit now, I may as well move the relevant ui_msg's to notes.
Can "note" only be called once per Portfile?
notes "this is a test"
port notes
pure-ftpd has the following notes:
this is a test
notes "this is a test"
notes "this is a second test"
port notes
pure-ftpd has the following notes:
this is a second test
notes "this is a multiline test
with this being the second line"
notes "a second notes block"
port notes
pure-ftpd has the following notes:
a second notes block
When are notes printed out, only on user instantiation of the `port notes <portname>` command, or do they get printed on `port install <portname>` as well? I am trying to determine which of my data needs to remain as ui_msg and which can go to notes.
Right now, in the pure-ftpd port, I have an entire post-activate phase that is all ui_msg, which I believe could be entirely changed to notes. Should I do a conditional check to make sure the port is installed, or is that taken care of by MacPorts internals?
For example, I now have:
ui_msg "You can start ${pretty_name} from the command line with:"
ui_msg " sudo ${prefix}/sbin/${name} &"
That would not make a lot of sense to display via `port notes` if the software is not installed. So I should wrap those blocks in a condition that checks if the port was installed? What is the best way to check if a port is installed? I was going to do a file exists check on the binary, but there probably is a better way to actually look in the MacPorts registry maybe.
Though I am not sure how possible that is going to be, if I am only allowed one call to "notes" per Portfile.
Any comments, suggestions, or links to new docs I am overlooking would be appreciated. Thank you.
--
Scott * If you contact me off list replace talklists@ with scott@ *
More information about the macports-dev
mailing list