Add a -n switch to show the packages "needed" by a package (i.e. the
packages which are depended upon). Provided in PR 13071 by woods@planix.com (Greg A. Woods), the addition to the synopsis by myself, pedant-in-chief.
This commit is contained in:
parent
e65a97d83b
commit
d069ffa789
|
@ -1,11 +1,11 @@
|
|||
/* $NetBSD: main.c,v 1.24 2001/03/05 16:53:14 wiz Exp $ */
|
||||
/* $NetBSD: main.c,v 1.25 2001/08/13 20:08:58 agc Exp $ */
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static char *rcsid = "from FreeBSD Id: main.c,v 1.14 1997/10/08 07:47:26 charnier Exp";
|
||||
#else
|
||||
__RCSID("$NetBSD: main.c,v 1.24 2001/03/05 16:53:14 wiz Exp $");
|
||||
__RCSID("$NetBSD: main.c,v 1.25 2001/08/13 20:08:58 agc Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -38,7 +38,7 @@ __RCSID("$NetBSD: main.c,v 1.24 2001/03/05 16:53:14 wiz Exp $");
|
|||
#include "lib.h"
|
||||
#include "info.h"
|
||||
|
||||
static char Options[] = "aBbcDde:fFhIikLl:mpqRrsSvV";
|
||||
static char Options[] = "aBbcDde:fFhIikLl:mnpqRrsSvV";
|
||||
|
||||
int Flags = 0;
|
||||
Boolean AllInstalled = FALSE;
|
||||
|
@ -55,7 +55,7 @@ static void
|
|||
usage(void)
|
||||
{
|
||||
fprintf(stderr, "%s\n%s\n%s\n",
|
||||
"usage: pkg_info [-BbcDdFfIikLmpqRrSsVvh] [-e package] [-l prefix]",
|
||||
"usage: pkg_info [-BbcDdFfIikLmnpqRrSsVvh] [-e package] [-l prefix]",
|
||||
" pkg-name [pkg-name ...]",
|
||||
" pkg_info -a [flags]");
|
||||
exit(1);
|
||||
|
@ -144,6 +144,10 @@ main(int argc, char **argv)
|
|||
Flags |= SHOW_MTREE;
|
||||
break;
|
||||
|
||||
case 'n':
|
||||
Flags |= SHOW_DEPENDS;
|
||||
break;
|
||||
|
||||
case 'p':
|
||||
Flags |= SHOW_PREFIX;
|
||||
break;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.\" $NetBSD: pkg_info.1,v 1.24 2001/04/09 12:48:37 wiz Exp $
|
||||
.\" $NetBSD: pkg_info.1,v 1.25 2001/08/13 20:08:58 agc Exp $
|
||||
.\"
|
||||
.\" FreeBSD install - a package for the installation and maintainance
|
||||
.\" of non-core utilities.
|
||||
|
@ -25,7 +25,7 @@
|
|||
.Nd a utility for displaying information on software packages
|
||||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
.Op Fl BbcDdFfhIikLmpqRrSsVv
|
||||
.Op Fl BbcDdFfhIikLmnpqRrSsVv
|
||||
.Bk -words
|
||||
.Op Fl e Ar package
|
||||
.Ek
|
||||
|
@ -136,6 +136,8 @@ organize it. This lets you add a special token to the start of
|
|||
each field.
|
||||
.It Fl m
|
||||
Show the mtree file (if any) for each package.
|
||||
.It Fl n
|
||||
Show which packages each package needs (depends upon), if any.
|
||||
.It Fl p
|
||||
Show the installation prefix for each package.
|
||||
.It Fl q
|
||||
|
|
Loading…
Reference in New Issue