port notes

Scott Haneda talklists at newgeo.com
Sat May 1 13:34:48 PDT 2010


On May 1, 2010, at 12:51 PM, Ryan Schmidt wrote:

> On May 1, 2010, at 14:27, Scott Haneda wrote:
> 
>> 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
> 
> Yes, it looks like "notes" can only be called once. You can however build up the notes in a regular Tcl variable, e.g.:
> 
> set my_notes Here are some notes.
> append my_notes Here are some more notes.
> 
> And then use the notes command with that variable at the end of the portfile.
> 
> notes ${my_notes}

Do you recall the history on "notes" and its behavior, I am wondering why its use is not more of a mimic of ui_msg.  Maybe us_msg could have just mapped out to notes, so that `port notes` would simply present the ui_msg to the user regardless of it being in the middle of installing or not.

I am trying to understand when to use notes, and when to use ui_msg, but not entirely seeing a very strong reason to use ui_msg any longer, now that notes is available.  However, notes is a little more cumbersome to use, and the presentation of it is not as nice as ui_msg in the actual tcl.

    set my_notes Here are some notes.
    append my_notes Here are some more notes.
    notes ${my_notes}

versus...

    ui_msg "Here are some notes."	
    ui_msg "Here are some more notes."

From what I can gather on this, ui_msg for anything that only pertains to the installation as it is happening.  notes for anything that the user may need to get back to and reference again.  So for example, a launchd load command is a nice candidate for notes, as are many of the other setup related messages that are printed out during install.  ui_msg is perfect for something like "${name} has been installed".
-- 
Scott * If you contact me off list replace talklists@ with scott@ * 



More information about the macports-dev mailing list