[MacPorts] #16146: port gohome spews lots of errors if port doesn't have homepage variable
#16146: port gohome spews lots of errors if port doesn't have homepage variable -------------------------------------+-------------------------------------- Reporter: ryandesign@macports.org | Owner: macports-tickets@lists.macosforge.org Type: defect | Status: new Priority: Normal | Milestone: MacPorts base bugs Component: base | Version: 1.7.0 Keywords: | -------------------------------------+-------------------------------------- `port gohome` returns lots of lines of errors if the port doesn't define the `homepage` variable. Yes, that variable is required according to `port lint`, but it would still be nice if this error spew could be reduced down to just one line: {{{ $ port gohome arts can't read "portinfo(homepage)": no such element in array while executing "set homepage $portinfo(homepage)" ("gohome" arm line 5) invoked from within "switch -- $action { cat { # Copy the portfile to standard output set f [open $portfile RDONLY]..." invoked from within "if {[file readable $portfile]} { switch -- $action { cat { # Copy the portfile to standard output ..." ("uplevel" body line 25) invoked from within "uplevel 1 $block" (procedure "foreachport" line 16) invoked from within "foreachport $portlist { # If we have a url, use that, since it's most specific, otherwise try to map the portname to a url if {$portur..." (procedure "action_portcmds" line 12) invoked from within "$action_proc $action $portlist [array get global_options]" (procedure "process_cmd" line 86) 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 "/mp/bin/port" line 3207) }}} I'm using MacPorts trunk @38780. -- Ticket URL: <http://trac.macports.org/ticket/16146> MacPorts <http://www.macports.org/> Ports system for Mac OS
#16146: port gohome spews lots of errors if port doesn't have homepage variable --------------------------------------+------------------------------------- Reporter: ryandesign@macports.org | Owner: raimue@macports.org Type: defect | Status: assigned Priority: Normal | Milestone: MacPorts base bugs Component: base | Version: 1.7.0 Resolution: | Keywords: --------------------------------------+------------------------------------- Changes (by raimue@macports.org): * owner: macports-tickets@lists.macosforge.org => raimue@macports.org * status: new => assigned Comment: I have a question about its implementation, currently it is opening the Portfile to find out the homepage. Wouldn't it be sufficient to rely on the value in the PortIndex and only open the Portfile if the value is not available there? This would make the command run faster. Attached is a patch for `port/port.tcl` to implement this behavior. It also fixes the errors if no homepage is available as reported originally. -- Ticket URL: <http://trac.macports.org/ticket/16146#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#16146: port gohome spews lots of errors if port doesn't have homepage variable --------------------------------------+------------------------------------- Reporter: ryandesign@macports.org | Owner: raimue@macports.org Type: defect | Status: assigned Priority: Normal | Milestone: MacPorts base bugs Component: base | Version: 1.7.0 Resolution: | Keywords: --------------------------------------+------------------------------------- Comment (by ryandesign@macports.org): The patch looks good! Please commit. -- Ticket URL: <http://trac.macports.org/ticket/16146#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#16146: port gohome spews lots of errors if port doesn't have homepage variable --------------------------------------+------------------------------------- Reporter: ryandesign@macports.org | Owner: raimue@macports.org Type: defect | Status: closed Priority: Normal | Milestone: MacPorts base bugs Component: base | Version: 1.7.0 Resolution: fixed | Keywords: --------------------------------------+------------------------------------- Changes (by raimue@macports.org): * status: assigned => closed * resolution: => fixed Comment: Committed in r39036 with a slight change to the error message. -- Ticket URL: <http://trac.macports.org/ticket/16146#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#16146: port gohome spews lots of errors if port doesn't have homepage variable --------------------------------------+------------------------------------- Reporter: ryandesign@… | Owner: raimue@… Type: defect | Status: closed Priority: Normal | Milestone: MacPorts 1.7.0 Component: base | Version: 1.7.0 Resolution: fixed | Keywords: Port: | --------------------------------------+------------------------------------- Changes (by jmr@…): * milestone: MacPorts Future => MacPorts 1.7.0 -- Ticket URL: <http://trac.macports.org/ticket/16146#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts