NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/51878: db(1) 'quiet' mode does not exit according to documented behavior



The following reply was made to PR bin/51878; it has been noted by GNATS.

From: christos%zoulas.com@localhost (Christos Zoulas)
To: gnats-bugs%NetBSD.org@localhost, gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost
Cc: 
Subject: Re: bin/51878: db(1) 'quiet' mode does not exit according to documented behavior
Date: Sun, 15 Jan 2017 10:51:07 -0500

 On Jan 15,  5:40am, cfkoch%edgebsd.org@localhost (cfkoch%edgebsd.org@localhost) wrote:
 -- Subject: bin/51878: db(1) 'quiet' mode does not exit according to document
 
 | >Number:         51878
 | >Category:       bin
 | >Synopsis:       db(1) 'quiet' mode does not exit according to documented behavior
 | >Confidential:   no
 | >Severity:       non-critical
 | >Priority:       medium
 | >Responsible:    bin-bug-people
 | >State:          open
 | >Class:          sw-bug
 | >Submitter-Id:   net
 | >Arrival-Date:   Sun Jan 15 05:40:00 +0000 2017
 | >Originator:     Charlotte Koch
 | >Release:        amd64 CURRENT
 | >Organization:
 | >Environment:
 | NetBSD sakuracity 7.99.52 NetBSD 7.99.52 (CHARLOTTE) #0: Fri Dec 23 12:03:14 PST 2016  charlotte@sakuracity:/home/charlotte/devel/netbsd/sys/arch/amd64/compile/obj/CHARLOTTE amd64
 | >Description:
 | The man page for db(1) indicates that if you pass the '-q' flag then reading a nonexistent key from a hash(3) database does not result in an error. It is true that error messages are suppressed but the exit status of the command is still nonzero, which I do not believe is the intended behavior.
 | >How-To-Repeat:
 | It's as easy as
 | 
 | "db hash blah.db foo bar; db -q hash blah.db quux; echo $?"
 | >Fix:
 | A proposed patch is available at https://edgebsd.org/~cfkoch/patches/20170114-db-quiet.diff.txt
 | 
 | FWIW a whole slew of ATF tests for db(1) are on their way, too
 
 Thanks. I think it is best to create a new flag for "no error if not found"
 rather than overloading -q. Either way we should document the behavior.
 
 christos
 


Home | Main Index | Thread Index | Old Index