Opened 17 years ago
Closed 16 years ago
#14061 closed defect (fixed)
"port contents" in a non-port directory causes 38 lines of error spew
Reported by: | ryandesign (Ryan Carsten Schmidt) | Owned by: | jmpalacios (Juan Manuel Palacios) |
---|---|---|---|
Priority: | Normal | Milestone: | MacPorts 1.7.0 |
Component: | base | Version: | 1.7.0 |
Keywords: | Cc: | ||
Port: |
Description
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.
Attachments (1)
Change History (6)
Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)
Attachment: | port.tcl.diff added |
---|
comment:1 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)
Owner: | changed from macports-tickets@… to jmpp@… |
---|
comment:2 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)
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.
comment:3 Changed 16 years ago by tobypeterson
Milestone: | MacPorts base bugs → MacPorts Future |
---|
Milestone MacPorts base bugs deleted
comment:4 Changed 16 years ago by jmroot (Joshua Root)
The large registry error part of this is gone now. Not sure if that's thanks to the fix for #16740 or something prior.
comment:5 Changed 16 years ago by jmroot (Joshua Root)
Milestone: | MacPorts Future → MacPorts 1.7.0 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
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.