summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew N. Dodd <mdodd@FreeBSD.org>2003-03-25 00:51:41 +0000
committerMatthew N. Dodd <mdodd@FreeBSD.org>2003-03-25 00:51:41 +0000
commit5e3714183feed559a5ba6235ed4adf9b1f7e3798 (patch)
tree5343c59b44205140936869904a792e6618e240e7
parentb5cff0d6538ae5934e9c5a062c487f33805f04f4 (diff)
downloadsrc-test2-5e3714183feed559a5ba6235ed4adf9b1f7e3798.tar.gz
src-test2-5e3714183feed559a5ba6235ed4adf9b1f7e3798.zip
Notes
-rw-r--r--usr.sbin/pkg_install/info/info.h1
-rw-r--r--usr.sbin/pkg_install/info/main.c8
-rw-r--r--usr.sbin/pkg_install/info/perform.c2
-rw-r--r--usr.sbin/pkg_install/info/pkg_info.18
4 files changed, 17 insertions, 2 deletions
diff --git a/usr.sbin/pkg_install/info/info.h b/usr.sbin/pkg_install/info/info.h
index 94a8b5b71c25..c2d5eed72c01 100644
--- a/usr.sbin/pkg_install/info/info.h
+++ b/usr.sbin/pkg_install/info/info.h
@@ -61,6 +61,7 @@ TAILQ_HEAD(which_head, which_entry);
extern int Flags;
extern Boolean Quiet;
+extern Boolean QUIET;
extern char *InfoPrefix;
extern char PlayPen[];
extern char *CheckPkg;
diff --git a/usr.sbin/pkg_install/info/main.c b/usr.sbin/pkg_install/info/main.c
index 401cf131e535..a3ba4fc7f7c1 100644
--- a/usr.sbin/pkg_install/info/main.c
+++ b/usr.sbin/pkg_install/info/main.c
@@ -26,11 +26,12 @@ __FBSDID("$FreeBSD$");
#include "info.h"
#include <err.h>
-static char Options[] = "acdDe:fgGhiIkl:LmoO:pPqrRst:vVW:x";
+static char Options[] = "acdDe:fgGhiIkl:LmoO:pPqQrRst:vVW:x";
int Flags = 0;
match_t MatchType = MATCH_GLOB;
Boolean Quiet = FALSE;
+Boolean QUIET = FALSE;
char *InfoPrefix = (char *)(uintptr_t)"";
char PlayPen[FILENAME_MAX];
char *CheckPkg = NULL;
@@ -151,6 +152,11 @@ main(int argc, char **argv)
Quiet = TRUE;
break;
+ case 'Q':
+ Quiet = TRUE;
+ QUIET = TRUE;
+ break;
+
case 't':
strlcpy(PlayPen, optarg, sizeof(PlayPen));
break;
diff --git a/usr.sbin/pkg_install/info/perform.c b/usr.sbin/pkg_install/info/perform.c
index d87dd13ad8dd..f45f7c7c6316 100644
--- a/usr.sbin/pkg_install/info/perform.c
+++ b/usr.sbin/pkg_install/info/perform.c
@@ -191,6 +191,8 @@ pkg_do(char *pkg)
/* Start showing the package contents */
if (!Quiet)
printf("%sInformation for %s:\n\n", InfoPrefix, pkg);
+ else if (QUIET)
+ printf("%s%s:", InfoPrefix, pkg);
if (Flags & SHOW_COMMENT)
show_file("Comment:\n", COMMENT_FNAME);
if (Flags & SHOW_REQUIRE)
diff --git a/usr.sbin/pkg_install/info/pkg_info.1 b/usr.sbin/pkg_install/info/pkg_info.1
index f618e0109a1b..347367fa6506 100644
--- a/usr.sbin/pkg_install/info/pkg_info.1
+++ b/usr.sbin/pkg_install/info/pkg_info.1
@@ -25,16 +25,18 @@
.Nd a utility for displaying information on software packages
.Sh SYNOPSIS
.Nm
-.Op Fl cdDfgGiIkLmopPqrRsvVx
+.Op Fl cdDfgGiIkLmopPqQrRsvVx
.Op Fl e Ar package
.Op Fl l Ar prefix
.Op Fl t Ar template
.Op Ar pkg-name ...
.Nm
.Op Fl q
+.Op Fl Q
.Fl W Ar filename
.Nm
.Op Fl q
+.Op Fl Q
.Fl O Ar origin
.Nm
.Fl a
@@ -67,6 +69,10 @@ Be
.Dq quiet
in emitting report headers and such, just dump the
raw info (basically, assume a non-human reading).
+.It Fl Q
+Be
+.Dq quiet
+as above but print preface output with the package name.
.It Fl c
Show the (one line) comment field for each package.
.It Fl d