Ticket #11837 (closed enhancement: fixed)
Make darwinports scripting easier
| Reported by: | eridius@… | Owned by: | macports-tickets@… |
|---|---|---|---|
| Priority: | Low | Milestone: | MacPorts 1.4 |
| Component: | base | Version: | 1.4.3 |
| Keywords: | Cc: | eridius@… | |
| Port: |
Description
Currently writing a script that uses the darwinports infrastructure requires defining several procs and passing around arrays of options. Ideally I could write a script that looked like
package require darwinports dportinit # do stuff here
but instead I need to do something like
package require darwinports proc ui_isset {val} { if {$val == "ports_debug"} {return 1} {return 0} } proc global_option_isset {val} { return 0 } # UI callback proc ui_prefix {priority} { switch $priority { debug { return "DEBUG: " } error { return "Error: " } warn { return "Warning: " } default { return "" } } } proc ui_channels {priority} { return {stderr} } array set ui_options {ports_debug yes} array set global_options {} array set global_variations {} dportinit ui_options global_options global_variations
Darwinports should gracefully handle the lack of these procs and should also allow you to pass nothing to dportinit to mean default behaviour.
Change History
Note: See
TracTickets for help on using
tickets.

