[MacPorts] #14061: "port contents" in a non-port directory causes 38 lines of error spew
#14061: "port contents" in a non-port directory causes 38 lines of error spew -------------------------------------+-------------------------------------- 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: | -------------------------------------+-------------------------------------- I think this error output can be shortened considerably: {{{ $ cd $ port contents Can't map the URL 'file://.' to a port description file ("Could not find Portfile in /Users/rschmidt"). Please verify that the directory and portfile syntax are correct. To use the current port, you must be in a port's directory. (you might also see this message if a pseudo-port such as outdated or installed expands to no ports). Registry error: @0_0 not registered as installed. while executing "open_entry $name" (procedure "receipt_flat::port_registered" line 16) invoked from within "${macports::registry.format}::port_registered $name" (procedure "registry::port_registered" line 3) invoked from within "registry::port_registered $portname" invoked from within "set files [registry::port_registered $portname]" ("uplevel" body line 2) invoked from within "uplevel 1 $block" (procedure "foreachport" line 16) invoked from within "foreachport $portlist { set files [registry::port_registered $portname] if { $files != 0 } { if { [llength $files] > 0 } {..." (procedure "action_contents" 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 2706) $ }}} Perhaps to fix this we need something like in #13284. -- Ticket URL: <http://trac.macosforge.org/projects/macports/ticket/14061> MacPorts </projects/macports> Ports system for Mac OS
#14061: "port contents" in a non-port directory causes 38 lines of error spew --------------------------------------+------------------------------------- Reporter: ryandesign@macports.org | Owner: jmpp@macports.org Type: defect | Status: new Priority: Normal | Milestone: MacPorts base bugs Component: base | Version: 1.7.0 Resolution: | Keywords: --------------------------------------+------------------------------------- Changes (by ryandesign@macports.org): * owner: macports-tickets@lists.macosforge.org => jmpp@macports.org Comment: Is the attached patch an appropriate fix for this issue? I just copied some code from the `action_variants` procedure but it seems to work. -- Ticket URL: <http://trac.macosforge.org/projects/macports/ticket/14061#comment:1> MacPorts </projects/macports> Ports system for Mac OS
#14061: "port contents" in a non-port directory causes 38 lines of error spew --------------------------------------+------------------------------------- Reporter: ryandesign@macports.org | Owner: jmpp@macports.org Type: defect | Status: new Priority: Normal | Milestone: MacPorts base bugs Component: base | Version: 1.7.0 Resolution: | Keywords: --------------------------------------+------------------------------------- Comment (by ryandesign@macports.org): The patch I attached seems to have a bad side-effect. It causes "`port contents`" in an uncommitted port's dir to say "`Error: Port foo not found`". So a different solution is needed. -- Ticket URL: <http://trac.macosforge.org/projects/macports/ticket/14061#comment:2> MacPorts </projects/macports> Ports system for Mac OS
participants (1)
-
MacPorts