- Add the 'b' option which causes BLOCKSIZE to be hornored when
the 'q' or 'Q' options are present. - Document BLOCKSIZE.
This commit is contained in:
parent
d4eb5dac71
commit
67da80078c
@ -62,6 +62,7 @@ TAILQ_HEAD(which_head, which_entry);
|
||||
extern int Flags;
|
||||
extern Boolean Quiet;
|
||||
extern Boolean QUIET;
|
||||
extern Boolean UseBlkSz;
|
||||
extern char *InfoPrefix;
|
||||
extern char PlayPen[];
|
||||
extern char *CheckPkg;
|
||||
|
@ -26,12 +26,13 @@ __FBSDID("$FreeBSD$");
|
||||
#include "info.h"
|
||||
#include <err.h>
|
||||
|
||||
static char Options[] = "acdDe:fgGhiIkl:LmoO:pPqQrRst:vVW:x";
|
||||
static char Options[] = "abcdDe:fgGhiIkl:LmoO:pPqQrRst:vVW:x";
|
||||
|
||||
int Flags = 0;
|
||||
match_t MatchType = MATCH_GLOB;
|
||||
Boolean Quiet = FALSE;
|
||||
Boolean QUIET = FALSE;
|
||||
Boolean UseBlkSz = FALSE;
|
||||
char *InfoPrefix = (char *)(uintptr_t)"";
|
||||
char PlayPen[FILENAME_MAX];
|
||||
char *CheckPkg = NULL;
|
||||
@ -63,6 +64,10 @@ main(int argc, char **argv)
|
||||
MatchType = MATCH_ALL;
|
||||
break;
|
||||
|
||||
case 'b':
|
||||
UseBlkSz = TRUE;
|
||||
break;
|
||||
|
||||
case 'v':
|
||||
Verbose = TRUE;
|
||||
/* Reasonable definition of 'everything' */
|
||||
|
@ -25,7 +25,7 @@
|
||||
.Nd a utility for displaying information on software packages
|
||||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
.Op Fl cdDfgGiIkLmopPqQrRsvVx
|
||||
.Op Fl bcdDfgGiIkLmopPqQrRsvVx
|
||||
.Op Fl e Ar package
|
||||
.Op Fl l Ar prefix
|
||||
.Op Fl t Ar template
|
||||
@ -60,6 +60,12 @@ an installed package, the pathname to a package distribution file or a
|
||||
URL to an FTP available package.
|
||||
.It Fl a
|
||||
Show all currently installed packages.
|
||||
.It Fl b
|
||||
Use the BLOCKSIZE environment variable for output even when the
|
||||
.Fl q
|
||||
or
|
||||
.Fl Q
|
||||
flag is present.
|
||||
.It Fl v
|
||||
Turn on verbose output.
|
||||
.It Fl p
|
||||
@ -189,16 +195,22 @@ command line, or from already installed package information
|
||||
in
|
||||
.Pa /var/db/pkg/ Ns Aq Ar pkg-name .
|
||||
.Sh ENVIRONMENT
|
||||
.Ev PKG_TMPDIR
|
||||
points to the directory where
|
||||
.Bl -tag -width PKG_TMPDIR
|
||||
.It Ev BLOCKSIZE
|
||||
If the environment variable
|
||||
.Ev BLOCKSIZE
|
||||
is set the block counts will be displayed in units of that
|
||||
size block.
|
||||
.Pp
|
||||
.It Ev PKG_TMPDIR
|
||||
Points to the directory where
|
||||
.Nm
|
||||
creates its temporary files.
|
||||
If this variable is not set,
|
||||
.Ev TMPDIR
|
||||
is used. If both are unset, the builtin defaults are used.
|
||||
.Pp
|
||||
.Ev PKG_DBDIR
|
||||
specifies an alternative location for the installed package database.
|
||||
.It Ev PKG_DBDIR
|
||||
Specifies an alternative location for the installed package database.
|
||||
.Sh FILES
|
||||
.Bl -tag -width /var/db/pkg -compact
|
||||
.It Pa /var/tmp
|
||||
|
@ -268,6 +268,9 @@ show_size(const char *title, Package *plist)
|
||||
}
|
||||
if (!Quiet)
|
||||
printf("%lu\t(%s)\n", howmany(size, blksize), descr);
|
||||
else
|
||||
if (UseBlkSz)
|
||||
printf("%lu\n", howmany(size, blksize));
|
||||
else
|
||||
printf("%lu\n", size);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user