#56549 closed defect (fixed)
selfupdate loses error message returned by mportsync
| Reported by: | jmroot (Joshua Root) | Owned by: | jmroot (Joshua Root) |
|---|---|---|---|
| Priority: | Normal | Milestone: | MacPorts 2.7.0 |
| Component: | base | Version: | |
| Keywords: | Cc: | Schamschula (Marius Schamschula), siccegge (Christoph Egger) | |
| Port: |
Description
% sudo port sync ---> Updating the ports tree port sync failed: Synchronization of 1 source failed
The last line there is sometimes the only error message generated outside of verbose mode, e.g. when a git repo fails to sync. selfupdate::main does this:
try {
mportsync $optionslist
} catch {{*} eCode eMessage} {
return -code error "Couldn't sync the ports tree: $eMessage"
}
which should return an error message that includes mportsync's. But apparently something further up the call chain fails to print it:
% sudo port selfupdate ---> Updating MacPorts base sources using rsync MacPorts base version 2.5.99 installed, MacPorts base version 2.5.0 downloaded. ---> Updating the ports tree
Needless to say, this is pretty confusing.
Change History (5)
comment:1 Changed 8 years ago by jmroot (Joshua Root)
comment:2 Changed 8 years ago by Schamschula (Marius Schamschula)
| Cc: | Schamschula added |
|---|
comment:3 Changed 6 years ago by siccegge (Christoph Egger)
| Cc: | siccegge added |
|---|
comment:4 Changed 5 years ago by jmroot (Joshua Root)
| Owner: | set to jmroot |
|---|---|
| Resolution: | → fixed |
| Status: | new → closed |
comment:5 Changed 5 years ago by jmroot (Joshua Root)
| Milestone: | → MacPorts 2.7.0 |
|---|
Note: See
TracTickets for help on using
tickets.

Actually it's worse than that. From action_selfupdate:
if { [catch {macports::selfupdate [array get options] base_updated} result ] } { ui_debug $::errorInfo ui_error $result if {![macports::ui_isset ports_verbose]} { ui_msg "Please run `port -v selfupdate' for details." } else { # Let's only print the ticket URL if the user has followed the # advice we printed earlier. print_tickets_url } fatal "port selfupdate failed: $result" }None of that stuff is being printed, which means macports::selfupdate is appearing to succeed when it in fact failed.