Subject: Re: error handling
To: Hubert Feyrer <feyrer@rfhs8012.fh-regensburg.de>
From: Frederick Bruckman <fb@enteract.com>
List: tech-pkg
Date: 07/20/1999 01:52:23
On Mon, 19 Jul 1999, Hubert Feyrer wrote:

> Shouldn't we just bomb out ("exit 1") instead of "continue" here, telling
> the user that there's something broken? At least for files that haven
> wrong checksums or aren't of the form "patch-local-*"?
> 
> The patch below implements that behaviour - please let me know if i'm
> missing something. Else I'd like to commit that soonish.

> +								${ECHO_MSG} ">> Unknown patch file: $$i"; \
> +								${ECHO_MSG} ">> Please make sure that either 'make makepatchsum' was ran or"; \
> +								${ECHO_MSG} ">> check your SUP configuration for the 'delete' flag!"; \

The message has the potential to confuse the naive user. Besides,
there are other ways to get old patches in your tree, including
supping for the first time on top of an existing pkgsrc tree.
Consider: the delete flag has no effect if
/usr/sup/current/pkgsrc.last does not already exist or if it does not
already contain the patch file in question. Therefore once it gets to
this point, the implied solution of supping with the delete flag is
not likely to fix anything.

How about somthing like, ".. if $ii is an obsolete patch, you must
first delete it to build this package."?