unexpected error from port variant when port is not found
Ryan Schmidt
ryandesign at macports.org
Tue Nov 20 14:04:48 PST 2007
On Nov 20, 2007, at 13:38, Adam Mercer wrote:
> I was just looking at the available variants for a port, I mistyped
> the name of the port and received the following error message:
>
> $ port variants misspelled_port
> No port misspelled_port found.
> can't read "portinfo(porturl)": no such element in array
> while executing
> "set porturl $portinfo(porturl)"
> ("uplevel" body line 15)
> invoked from within
> "uplevel 1 $block"
> (procedure "foreachport" line 16)
> invoked from within
> "foreachport $portlist {
> # search for port
> if {[catch {mportsearch $portname no exact} result]} {
> global errorInfo
> ..."
> (procedure "action_variants" line 4)
> invoked from within
> "$action_proc $action $portlist [array get global_options]"
> (procedure "process_cmd" line 60)
> invoked from within
> "process_cmd $remaining_args"
> invoked from within
> "if { [llength $remaining_args] > 0 } {
>
> # If there are remaining arguments, process those as a command
>
> # Exit immediately, by default, unless..."
> (file "/opt/local/bin/port" line 2651)
> $
>
> I would expect the initial error of "No port misspelled_port found",
> but not the rest. This is with base from the top of the release_1_6
> branch. Is this the expected behaviour?
Yeah, that's pretty messy! Sure would be nice not to have all that
cruft.
"port info misspelled_port" doesn't have this problem.
More information about the macports-dev
mailing list