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

[ Available lists | Index of freebsd-bugs | Month of Feb 2008 | Week of 25 Feb 2008 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
Joseph Terner <jtsn@gmx.de>
Date
25 Feb 2008 17:10:04
Subject
misc/121093: pkg_add(1) does nothing and returns zero if called without arguments
Message-ID
200802251703.m1PH3xdP050187@www.freebsd.org


[ Hide this part ]
 
>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@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:


Elapsed time: 0.081 seconds