misc/121093: pkg_add(1) does nothing and returns zero if called without arguments

Joseph Terner jtsn at gmx.de
Mon Feb 25 17:10:05 UTC 2008


>Number:         121093
>Category:       misc
>Synopsis:       pkg_add(1) does nothing and returns zero if called without arguments
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Feb 25 17:10:04 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Joseph Terner
>Release:        FreeBSD 6.3-RELEASE
>Organization:
>Environment:
FreeBSD nexus 6.3-RELEASE FreeBSD 6.3-RELEASE #0: Wed Feb  6 02:58:38 CET 2008     root at nexus:/var/tmp/obj/usr/src/sys/NEXUS  i386
>Description:
According to the pkg_add(1) man page at least one argument is mandantory:

SYNOPSIS
     pkg_add [-vInfFrRMSK] [-t template] [-p prefix] [-P prefix]
             [-C chrootdir] pkg-name [pkg-name ...]

But if incorrectly called without arguments, no usage information is displayed and the return value is zero.

# pkg_add
# echo $?
0
#

pkg_delete(1) behaves correctly:

# pkg_delete
pkg_delete: missing package name(s)
usage: pkg_delete [-dDfGinrvxX] [-p prefix] pkg-name ...
       pkg_delete -a [flags]
# echo $?
1
#

>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list