Subject: bin/5628: pkg_* tools don't print error messages
To: None <>
From: None <>
List: netbsd-bugs
Date: 06/19/1998 23:48:27
>Number:         5628
>Category:       bin
>Synopsis:       pkg_* tools don't print error messages
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jun 19 23:50:01 1998
>Originator:     Chuck Silvers
>Release:        NetBSD-current
System: NetBSD 1.3E NetBSD 1.3E (CHUQ) #17: Sat Jun 13 23:07:21 PDT 1998 sparc

when pkg_add or any of the other pkg_* commands encounter an error,
they fail to print an error message.  this is because all of the
calls to err() and such are preceeded by "cleanup(0)", and cleanup()
calls exit().  thus, no errors are printed.

do anything with the pkg_* tools that results in an error,
such as trying to pkg_add something without enough space
in any tmp directory to hold the intermediate files.
notice that it fails to do anything, including say why
it didn't do anything.

maybe call cleanup() after printing errors rather than before?