Subject: bin/5628: pkg_* tools don't print error messages
To: None <gnats-bugs@gnats.netbsd.org>
From: None <chuq@chuq.com>
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
>Last-Modified:
>Originator:     Chuck Silvers
>Organization:
>Release:        NetBSD-current
>Environment:
System: NetBSD chuq.chuq.com 1.3E NetBSD 1.3E (CHUQ) #17: Sat Jun 13 23:07:21 PDT 1998 chs@chuq.chuq.com:/home/chs/netbsd/src/origsys/sys/arch/sparc/compile/CHUQ sparc


>Description:
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.

>How-To-Repeat:
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.

>Fix:
maybe call cleanup() after printing errors rather than before?
>Audit-Trail:
>Unformatted: