Subject: bin/18097: pkg_info -e is sometimes wrong
To: None <>
From: None <>
List: netbsd-bugs
Date: 08/28/2002 19:10:37
>Number:         18097
>Category:       bin
>Synopsis:       pkg_info -e is sometimes wrong
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Aug 28 03:12:01 PDT 2002
>Originator:     Curt Sampson
>Release:        NetBSD 1.6B
System: NetBSD 1.6B NetBSD 1.6B (IRONIC-$Revision: 1.4 $) #5: Wed Jun 26 21:44:34 JST 2002 i386
Architecture: i386
Machine: i386
    If one has never installed a package (i.e., /usr/pkg and /var/db/pkg
    do not exist), and one uses pkg_info -e to query for the presence
    of a package, pkg_info will always return 0 (meaning that the package
    is present), even though it should return 1.
    rm -rf /usr/pkg /var/db/pkg
    pkg_info -e foobar
    echo $?