Is the long error message at rev-upgrade wanted or a bug?

Clemens Lang cal at macports.org
Fri Apr 5 01:55:40 PDT 2013


On Thu, Apr 04, 2013 at 01:05:46PM +0200, MK-MacPorts at techno.ms wrote:
> The manual upgrade worked fine, but is the long error message on
> rev-upgrade a bug or a wanted feature?

It's a bug, or at least not a very nice solution.

On Fri, Apr 05, 2013 at 07:47:35AM +1100, Joshua Root wrote:
> I don't think revupgrade_scanandrebuild should itself be throwing an
> error because building a port failed. Or if it does, the error should
> be caught by the caller.
> 
> Changing: error "<message>"
> to: ui_error "<message>"; return 0
> would give the desired behaviour, I think.

I'd favor adding code catching the error at the caller level, e.g. in
macports::revupgrade in macports1.0/macports.tcl. There's a semantic
difference between "revupgrade returned 0 and previously printed some
text" and "an error occured and revupgrade stopped". In case of an
error, macports::revupgrade should probably return != 0, because that's
what port/port.tcl checks for as far as I can see (and it also prints
the ticket URL, if it failed).

-- 
Clemens Lang



More information about the macports-dev mailing list