Add -V option to all pkgtools, which reports the version of the pkgtools.
Document it. While there, fix the ordering of the option descriptions in some man pages. Set version to 20010305.
This commit is contained in:
parent
fcf23e4f53
commit
2ba98ef9a1
@ -1,4 +1,4 @@
|
||||
# $NetBSD: README,v 1.4 2000/05/16 16:38:15 hubertf Exp $
|
||||
# $NetBSD: README,v 1.5 2001/03/05 16:53:12 wiz Exp $
|
||||
# Original from FreeBSD, no rcs id.
|
||||
|
||||
This is the pkg_install suite of tools for doing maintainance of
|
||||
@ -13,3 +13,6 @@ of dozen features on top. Whee! :-)
|
||||
In another round of enhancements, NetBSD changes were added by
|
||||
Alistair Crooks and Hubert Feyrer, Thorsten Frueauf and Christian E.
|
||||
Hopps.
|
||||
|
||||
When making snapshots, please increase PKGTOOLS_VERSION in lib/version.h
|
||||
to that day's date.
|
@ -1,11 +1,11 @@
|
||||
/* $NetBSD: main.c,v 1.17 2000/12/13 03:17:53 hubertf Exp $ */
|
||||
/* $NetBSD: main.c,v 1.18 2001/03/05 16:53:13 wiz Exp $ */
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static char *rcsid = "from FreeBSD Id: main.c,v 1.16 1997/10/08 07:45:43 charnier Exp";
|
||||
#else
|
||||
__RCSID("$NetBSD: main.c,v 1.17 2000/12/13 03:17:53 hubertf Exp $");
|
||||
__RCSID("$NetBSD: main.c,v 1.18 2001/03/05 16:53:13 wiz Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -35,7 +35,7 @@ __RCSID("$NetBSD: main.c,v 1.17 2000/12/13 03:17:53 hubertf Exp $");
|
||||
#include "lib.h"
|
||||
#include "add.h"
|
||||
|
||||
static char Options[] = "hvIRfnp:SMt:";
|
||||
static char Options[] = "hVvIRfnp:SMt:";
|
||||
|
||||
char *Prefix = NULL;
|
||||
Boolean NoInstall = FALSE;
|
||||
@ -53,7 +53,7 @@ static void
|
||||
usage(void)
|
||||
{
|
||||
fprintf(stderr, "%s\n%s\n",
|
||||
"usage: pkg_add [-vInfRMS] [-t template] [-p prefix]",
|
||||
"usage: pkg_add [-hVvInfRMS] [-t template] [-p prefix]",
|
||||
" pkg-name [pkg-name ...]");
|
||||
exit(1);
|
||||
}
|
||||
@ -106,6 +106,10 @@ main(int argc, char **argv)
|
||||
AddMode = MASTER;
|
||||
break;
|
||||
|
||||
case 'V':
|
||||
show_version();
|
||||
/* NOTREACHED */
|
||||
|
||||
case 'h':
|
||||
case '?':
|
||||
default:
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: pkg_add.1,v 1.21 2001/01/07 01:39:20 hubertf Exp $
|
||||
.\" $NetBSD: pkg_add.1,v 1.22 2001/03/05 16:53:13 wiz Exp $
|
||||
.\"
|
||||
.\" FreeBSD install - a package for the installation and maintainance
|
||||
.\" of non-core utilities.
|
||||
@ -25,7 +25,7 @@
|
||||
.Nd a utility for installing software package distributions
|
||||
.Sh SYNOPSIS
|
||||
.Nm ""
|
||||
.Op Fl vInfRMS
|
||||
.Op Fl fIMnRSVv
|
||||
.Bk -words
|
||||
.Op Fl t Ar template
|
||||
.Ek
|
||||
@ -177,6 +177,8 @@ You can get a performance boost by setting the staging area
|
||||
to reside on the same disk partition as target directories for package
|
||||
file installation; often this is
|
||||
.Pa /usr .
|
||||
.It Fl V
|
||||
Print version number and exit.
|
||||
.It Fl v
|
||||
Turn on verbose output.
|
||||
.El
|
||||
|
@ -1,8 +1,8 @@
|
||||
/* $NetBSD: main.c,v 1.20 2001/02/21 13:12:47 hubertf Exp $ */
|
||||
/* $NetBSD: main.c,v 1.21 2001/03/05 16:53:13 wiz Exp $ */
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: main.c,v 1.20 2001/02/21 13:12:47 hubertf Exp $");
|
||||
__RCSID("$NetBSD: main.c,v 1.21 2001/03/05 16:53:13 wiz Exp $");
|
||||
#endif
|
||||
|
||||
/*
|
||||
@ -339,7 +339,12 @@ main(int argc, char *argv[])
|
||||
if (argc < 2)
|
||||
usage();
|
||||
|
||||
if (strcasecmp(argv[1], "rebuild") == 0) {
|
||||
if (strcmp(argv[1], "-V") == 0) {
|
||||
|
||||
show_version();
|
||||
/* NOTREACHED */
|
||||
|
||||
} else if (strcasecmp(argv[1], "rebuild") == 0) {
|
||||
|
||||
rebuild();
|
||||
printf("Done.\n");
|
||||
@ -549,7 +554,7 @@ main(int argc, char *argv[])
|
||||
void
|
||||
usage(void)
|
||||
{
|
||||
printf("usage: pkg_admin command args ...\n"
|
||||
printf("usage: pkg_admin [-V] command args ...\n"
|
||||
"Where 'commands' and 'args' are:\n"
|
||||
" rebuild - rebuild pkgdb from +CONTENTS files\n"
|
||||
" check [pkg ...] - check md5 checksum of installed files\n"
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: pkg_admin.1,v 1.11 2001/01/07 01:39:20 hubertf Exp $
|
||||
.\" $NetBSD: pkg_admin.1,v 1.12 2001/03/05 16:53:13 wiz Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1999 Hubert Feyrer. All rights reserved.
|
||||
.\"
|
||||
@ -37,12 +37,15 @@
|
||||
.Nd perform various administrative tasks to the pkg system.
|
||||
.Sh SYNOPSIS
|
||||
.Nm ""
|
||||
.Op Fl V
|
||||
.Ar command args ...
|
||||
.Sh DESCRIPTION
|
||||
This command performs various administrative tasks around the NetBSD
|
||||
Packages System. Available commands are:
|
||||
.Pp
|
||||
.Bl -tag -width check [pkg]
|
||||
.It Fl V
|
||||
Print version number and exit.
|
||||
.It Cm check Ar [pkg ...]
|
||||
Use this command to check the files belonging to some or all of the
|
||||
packages installed on the local machine against their MD5 checksum
|
||||
|
@ -1,11 +1,11 @@
|
||||
/* $NetBSD: main.c,v 1.16 1999/12/20 03:25:58 hubertf Exp $ */
|
||||
/* $NetBSD: main.c,v 1.17 2001/03/05 16:53:13 wiz Exp $ */
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static const char *rcsid = "from FreeBSD Id: main.c,v 1.17 1997/10/08 07:46:23 charnier Exp";
|
||||
#else
|
||||
__RCSID("$NetBSD: main.c,v 1.16 1999/12/20 03:25:58 hubertf Exp $");
|
||||
__RCSID("$NetBSD: main.c,v 1.17 2001/03/05 16:53:13 wiz Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -24,7 +24,7 @@ __RCSID("$NetBSD: main.c,v 1.16 1999/12/20 03:25:58 hubertf Exp $");
|
||||
#include "lib.h"
|
||||
#include "create.h"
|
||||
|
||||
static char Options[] = "ORhlvFf:p:P:C:c:d:i:k:L:r:t:X:D:m:s:S:b:B:";
|
||||
static char Options[] = "ORhlVvFf:p:P:C:c:d:i:k:L:r:t:X:D:m:s:S:b:B:";
|
||||
|
||||
char *Prefix = NULL;
|
||||
char *Comment = NULL;
|
||||
@ -55,7 +55,7 @@ static void
|
||||
usage(void)
|
||||
{
|
||||
fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n",
|
||||
"usage: pkg_create [-ORhlv] [-P dpkgs] [-C cpkgs] [-p prefix] [-f contents]",
|
||||
"usage: pkg_create [-ORhlVv] [-P dpkgs] [-C cpkgs] [-p prefix] [-f contents]",
|
||||
" [-i iscript] [-k dscript] [-r rscript] [-t template]",
|
||||
" [-X excludefile] [-D displayfile] [-m mtreefile]",
|
||||
" [-b build-version-file] [-B build-info-file]",
|
||||
@ -164,6 +164,10 @@ main(int argc, char **argv)
|
||||
BuildInfo = optarg;
|
||||
break;
|
||||
|
||||
case 'V':
|
||||
show_version();
|
||||
/* NOTREACHED */
|
||||
|
||||
case '?':
|
||||
default:
|
||||
usage();
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: pkg_create.1,v 1.25 2001/01/07 01:39:20 hubertf Exp $
|
||||
.\" $NetBSD: pkg_create.1,v 1.26 2001/03/05 16:53:13 wiz Exp $
|
||||
.\"
|
||||
.\" FreeBSD install - a package for the installation and maintainance
|
||||
.\" of non-core utilities.
|
||||
@ -32,7 +32,7 @@
|
||||
.Nd a utility for creating software package distributions
|
||||
.Sh SYNOPSIS
|
||||
.Nm ""
|
||||
.Op Fl ORhvl
|
||||
.Op Fl hlORVv
|
||||
.Bk -words
|
||||
.Op Fl B Ar build-info-file
|
||||
.Ek
|
||||
@ -104,15 +104,6 @@ description of the input syntax is included in this document.
|
||||
.Sh OPTIONS
|
||||
The following command line options are supported:
|
||||
.Bl -tag -width indent
|
||||
.It Fl b Ar build-version-file
|
||||
Install the file
|
||||
.Ar build-version-file
|
||||
so that users of binary packages can see what versions of
|
||||
the files used to control the build were used when creating the
|
||||
binary package. This allows some fine-grained version control information
|
||||
to be retained in a binary package and viewed wherever it is installed,
|
||||
using
|
||||
.Xr pkg_info 1 .
|
||||
.It Fl B Ar build-info-file
|
||||
Install the file
|
||||
.Ar build-info-file
|
||||
@ -124,6 +115,22 @@ binary package. This allows various build definitions
|
||||
to be retained in a binary package and viewed wherever it is installed,
|
||||
using
|
||||
.Xr pkg_info 1 .
|
||||
.It Fl b Ar build-version-file
|
||||
Install the file
|
||||
.Ar build-version-file
|
||||
so that users of binary packages can see what versions of
|
||||
the files used to control the build were used when creating the
|
||||
binary package. This allows some fine-grained version control information
|
||||
to be retained in a binary package and viewed wherever it is installed,
|
||||
using
|
||||
.Xr pkg_info 1 .
|
||||
.It Fl C Ar cpkgs
|
||||
Set the initial package conflict list to
|
||||
.Ar cpkgs .
|
||||
This is assumed to be a whitespace separated list of package names
|
||||
and is meant as a convenient shorthand for specifying multiple
|
||||
.Cm @pkgcfl
|
||||
directives in the packing list (see PACKING LIST DETAILS section below).
|
||||
.It Fl c Ar [-]desc
|
||||
Fetch package ``one line description'' from file
|
||||
.Ar desc
|
||||
@ -132,22 +139,15 @@ or, if preceded by
|
||||
the argument itself. This string should also
|
||||
give some idea of which version of the product (if any) the package
|
||||
represents.
|
||||
.It Fl C Ar cpkgs
|
||||
Set the initial package conflict list to
|
||||
.Ar cpkgs .
|
||||
This is assumed to be a whitespace separated list of package names
|
||||
and is meant as a convenient shorthand for specifying multiple
|
||||
.Cm @pkgcfl
|
||||
directives in the packing list (see PACKING LIST DETAILS section below).
|
||||
.It Fl D Ar displayfile
|
||||
Display the file after installing the package. Useful for things like
|
||||
legal notices on almost-free software, etc.
|
||||
.It Fl d Ar [-]desc
|
||||
Fetch long description for package from file
|
||||
.Ar desc
|
||||
or, if preceded by
|
||||
.Cm - ,
|
||||
the argument itself.
|
||||
.It Fl D Ar displayfile
|
||||
Display the file after installing the package. Useful for things like
|
||||
legal notices on almost-free software, etc.
|
||||
.It Fl f Ar packinglist
|
||||
Fetch ``packing list'' for package from the file
|
||||
.Ar packinglist
|
||||
@ -173,6 +173,9 @@ Set
|
||||
to be the de-install procedure for the package. This can be any
|
||||
executable program (or shell script). It will be invoked automatically
|
||||
when the package is later (if ever) de-installed.
|
||||
.It Fl L Ar SrcDir
|
||||
This sets the package's @src directive; see below for a description
|
||||
of what this does.
|
||||
.It Fl l
|
||||
Check that any symbolic links which are to be placed in the package are
|
||||
relative to the current prefix. This means using
|
||||
@ -181,9 +184,6 @@ and
|
||||
.Xr symlink 2
|
||||
to remove and re-link
|
||||
any symbolic links which are targetted at full path names.
|
||||
.It Fl L Ar SrcDir
|
||||
This sets the package's @src directive; see below for a description
|
||||
of what this does.
|
||||
.It Fl m Ar mtreefile
|
||||
Run
|
||||
.Xr mtree 8
|
||||
@ -207,11 +207,6 @@ Go into a `packing list Only' mode.
|
||||
This is used to do `fake pkg_add' operations when a package is installed.
|
||||
In such cases, it is necessary to know what the final, adjusted packing
|
||||
list will look like.
|
||||
.It Fl p Ar prefix
|
||||
Set
|
||||
.Ar prefix
|
||||
as the initial directory ``base'' to start from in selecting files for
|
||||
the package.
|
||||
.It Fl P Ar dpkgs
|
||||
Set the initial package dependency list to
|
||||
.Ar dpkgs .
|
||||
@ -219,6 +214,15 @@ This is assumed to be a whitespace separated list of package names
|
||||
and is meant as a convenient shorthand for specifying multiple
|
||||
.Cm @pkgdep
|
||||
directives in the packing list (see PACKING LIST DETAILS section below).
|
||||
.It Fl p Ar prefix
|
||||
Set
|
||||
.Ar prefix
|
||||
as the initial directory ``base'' to start from in selecting files for
|
||||
the package.
|
||||
.It Fl R
|
||||
Re-order any directories in the pkg/PLIST file into reverse alphabetic
|
||||
order, so that child directories will automatically be removed before
|
||||
parent directories.
|
||||
.It Fl r Ar rscript
|
||||
Set
|
||||
.Ar rscript
|
||||
@ -226,16 +230,6 @@ to be the ``requirements'' procedure for the package. This can be any
|
||||
executable program (or shell script). It will be invoked automatically
|
||||
at installation/deinstallation time to determine whether or not
|
||||
installation/deinstallation should proceed.
|
||||
.It Fl R
|
||||
Re-order any directories in the pkg/PLIST file into reverse alphabetic
|
||||
order, so that child directories will automatically be removed before
|
||||
parent directories.
|
||||
.It Fl s Ar size-pkg-file
|
||||
Store the given file for later querying with the
|
||||
.Xr pkg_info 1
|
||||
.Ar -s
|
||||
flag. The file is expected to contain the the size (in bytes) of all files of
|
||||
this package added up and stored as a ASCII string, terminated by a newline.
|
||||
.It Fl S Ar size-all-file
|
||||
Store the given file for later querying with the
|
||||
.Xr pkg_info 1
|
||||
@ -243,6 +237,12 @@ Store the given file for later querying with the
|
||||
flag. The file is expected to contain the size (in bytes) of all files of
|
||||
this package plus any required packages added up and stored as a
|
||||
ASCII string, terminated by a newline.
|
||||
.It Fl s Ar size-pkg-file
|
||||
Store the given file for later querying with the
|
||||
.Xr pkg_info 1
|
||||
.Ar -s
|
||||
flag. The file is expected to contain the the size (in bytes) of all files of
|
||||
this package added up and stored as a ASCII string, terminated by a newline.
|
||||
.It Fl t Ar template
|
||||
Use
|
||||
.Ar template
|
||||
@ -257,6 +257,8 @@ directory is limited. Be sure to leave some number of `X' characters
|
||||
for
|
||||
.Xr mktemp 3
|
||||
to fill in with a unique ID.
|
||||
.It Fl V
|
||||
Print version number and exit.
|
||||
.It Fl v
|
||||
Turn on verbose output.
|
||||
.It Fl X Ar excludefile
|
||||
|
@ -1,11 +1,11 @@
|
||||
/* $NetBSD: main.c,v 1.16 2000/06/07 02:10:28 hubertf Exp $ */
|
||||
/* $NetBSD: main.c,v 1.17 2001/03/05 16:53:13 wiz Exp $ */
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static char *rcsid = "from FreeBSD Id: main.c,v 1.11 1997/10/08 07:46:48 charnier Exp";
|
||||
#else
|
||||
__RCSID("$NetBSD: main.c,v 1.16 2000/06/07 02:10:28 hubertf Exp $");
|
||||
__RCSID("$NetBSD: main.c,v 1.17 2001/03/05 16:53:13 wiz Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -35,7 +35,7 @@ __RCSID("$NetBSD: main.c,v 1.16 2000/06/07 02:10:28 hubertf Exp $");
|
||||
#include "lib.h"
|
||||
#include "delete.h"
|
||||
|
||||
static char Options[] = "hvDdnfFp:OrR";
|
||||
static char Options[] = "hVvDdnfFp:OrR";
|
||||
|
||||
char *Prefix = NULL;
|
||||
char *ProgramPath = NULL;
|
||||
@ -50,7 +50,7 @@ lpkg_head_t pkgs;
|
||||
static void
|
||||
usage(void)
|
||||
{
|
||||
fprintf(stderr, "usage: pkg_delete [-vDdnFfOrR] [-p prefix] pkg-name ...\n");
|
||||
fprintf(stderr, "usage: pkg_delete [-vVDdnFfOrR] [-p prefix] pkg-name ...\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@ -120,6 +120,10 @@ main(int argc, char **argv)
|
||||
OnlyDeleteFromPkgDB = TRUE;
|
||||
break;
|
||||
|
||||
case 'V':
|
||||
show_version();
|
||||
/* NOTREACHED */
|
||||
|
||||
case 'h':
|
||||
case '?':
|
||||
default:
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: pkg_delete.1,v 1.18 2001/01/07 01:39:21 hubertf Exp $
|
||||
.\" $NetBSD: pkg_delete.1,v 1.19 2001/03/05 16:53:14 wiz Exp $
|
||||
.\"
|
||||
.\" FreeBSD install - a package for the installation and maintainance
|
||||
.\" of non-core utilities.
|
||||
@ -25,7 +25,7 @@
|
||||
.Nd a utility for deleting previously installed software package distributions
|
||||
.Sh SYNOPSIS
|
||||
.Nm ""
|
||||
.Op Fl vDdnFfOrR
|
||||
.Op Fl DdFfnORrVv
|
||||
.Bk -words
|
||||
.Op Fl p Ar prefix
|
||||
.Ek
|
||||
@ -78,6 +78,8 @@ If the
|
||||
flag is given, one or more (absolute) filenames may be specified and
|
||||
the Package Database will be consulted for the package to which the
|
||||
given file belongs. These packages are then deinstalled.
|
||||
.It Fl D
|
||||
If a deinstallation script exists for a given package, do not execute it.
|
||||
.It Fl d
|
||||
Remove empty directories created by file cleanup. By default, only
|
||||
files/directories explicitly listed in a package's contents (either as
|
||||
@ -87,16 +89,14 @@ directive) will be removed at deinstallation time. This option tells
|
||||
.Nm
|
||||
to also remove any directories that were emptied as a result of removing
|
||||
the package.
|
||||
.It Fl D
|
||||
If a deinstallation script exists for a given package, do not execute it.
|
||||
.It Fl f
|
||||
Force removal of the package, even if a dependency is recorded or the
|
||||
deinstall or require script fails.
|
||||
.It Fl F
|
||||
Any pkg-name given will be interpreted as pathname which is
|
||||
subsequently transformed in a (real) package name via the Package
|
||||
Database. That way, packges can be deleted by giving a filename
|
||||
instead of the package-name.
|
||||
.It Fl f
|
||||
Force removal of the package, even if a dependency is recorded or the
|
||||
deinstall or require script fails.
|
||||
.It Fl n
|
||||
Don't actually deinstall a package, just report the steps that
|
||||
would be taken if it were.
|
||||
@ -110,12 +110,6 @@ as the directory in which to delete files from any installed packages
|
||||
which do not explicitly set theirs. For most packages, the prefix will
|
||||
be set automatically to the installed location by
|
||||
.Xr pkg_add 1 .
|
||||
.It Fl r
|
||||
.Nm
|
||||
first builds a list of all packages that require (directly and indirectly)
|
||||
the one being deleted. It then deletes these packages using
|
||||
.Nm
|
||||
with the given options before deleting the user specified package.
|
||||
.It Fl R
|
||||
Like the
|
||||
.Fl r
|
||||
@ -124,6 +118,14 @@ option, this does a recursive delete. The
|
||||
option deletes the given package and any packages required by
|
||||
it, unless some other package still needs them. This can be used
|
||||
to delete a package and all the packages it needs.
|
||||
.It Fl r
|
||||
.Nm
|
||||
first builds a list of all packages that require (directly and indirectly)
|
||||
the one being deleted. It then deletes these packages using
|
||||
.Nm
|
||||
with the given options before deleting the user specified package.
|
||||
.It Fl V
|
||||
Print version number and exit.
|
||||
.It Fl v
|
||||
Turn on verbose output.
|
||||
.El
|
||||
|
@ -1,11 +1,11 @@
|
||||
/* $NetBSD: main.c,v 1.23 2000/06/19 00:55:11 hubertf Exp $ */
|
||||
/* $NetBSD: main.c,v 1.24 2001/03/05 16:53:14 wiz 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.23 2000/06/19 00:55:11 hubertf Exp $");
|
||||
__RCSID("$NetBSD: main.c,v 1.24 2001/03/05 16:53:14 wiz Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -38,7 +38,7 @@ __RCSID("$NetBSD: main.c,v 1.23 2000/06/19 00:55:11 hubertf Exp $");
|
||||
#include "lib.h"
|
||||
#include "info.h"
|
||||
|
||||
static char Options[] = "aBbcDde:fFhIikLl:mpqRrsSv";
|
||||
static char Options[] = "aBbcDde:fFhIikLl:mpqRrsSvV";
|
||||
|
||||
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 [-BbcDdFfIikLmpqRrSsvh] [-e package] [-l prefix]",
|
||||
"usage: pkg_info [-BbcDdFfIikLmpqRrSsVvh] [-e package] [-l prefix]",
|
||||
" pkg-name [pkg-name ...]",
|
||||
" pkg_info -a [flags]");
|
||||
exit(1);
|
||||
@ -176,6 +176,10 @@ main(int argc, char **argv)
|
||||
SHOW_REQBY | SHOW_DEPENDS | SHOW_PKG_SIZE | SHOW_ALL_SIZE;
|
||||
break;
|
||||
|
||||
case 'V':
|
||||
show_version();
|
||||
/* NOTREACHED */
|
||||
|
||||
case 'h':
|
||||
case '?':
|
||||
default:
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: pkg_info.1,v 1.22 2000/07/05 15:45:36 msaitoh Exp $
|
||||
.\" $NetBSD: pkg_info.1,v 1.23 2001/03/05 16:53:14 wiz 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 BbcDdFfhIikLmpqRrSsv
|
||||
.Op Fl BbcDdFfhIikLmpqRrSsVv
|
||||
.Bk -words
|
||||
.Op Fl e Ar package
|
||||
.Ek
|
||||
@ -151,6 +151,8 @@ in bytes.
|
||||
.It Fl s
|
||||
Show the size of this package in bytes. The size is calculated by
|
||||
adding up the size of each file of the package.
|
||||
.It Fl V
|
||||
Print version number and exit.
|
||||
.It Fl v
|
||||
Turn on verbose output.
|
||||
.El
|
||||
|
@ -1,9 +1,9 @@
|
||||
# $NetBSD: Makefile,v 1.14 2000/10/09 17:03:20 hubertf Exp $
|
||||
# $NetBSD: Makefile,v 1.15 2001/03/05 16:53:14 wiz Exp $
|
||||
# Original from FreeBSD, no rcs id.
|
||||
|
||||
LIB+= install
|
||||
SRCS+= exec.c file.c ftpio.c global.c lpkg.c pen.c pkgdb.c \
|
||||
plist.c str.c
|
||||
plist.c str.c version.c
|
||||
|
||||
MKLINT= no
|
||||
MKMAN= no
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: lib.h,v 1.31 2000/10/11 20:23:55 is Exp $ */
|
||||
/* $NetBSD: lib.h,v 1.32 2001/03/05 16:53:14 wiz Exp $ */
|
||||
|
||||
/* from FreeBSD Id: lib.h,v 1.25 1997/10/08 07:48:03 charnier Exp */
|
||||
|
||||
@ -174,6 +174,7 @@ void leave_playpen(char *);
|
||||
off_t min_free(char *);
|
||||
void save_dirs(char **c, char **p);
|
||||
void restore_dirs(char *c, char *p);
|
||||
void show_version(void);
|
||||
|
||||
/* String */
|
||||
char *get_dash_string(char **);
|
||||
|
49
usr.sbin/pkg_install/lib/version.c
Normal file
49
usr.sbin/pkg_install/lib/version.c
Normal file
@ -0,0 +1,49 @@
|
||||
/* $NetBSD: version.c,v 1.1 2001/03/05 16:53:14 wiz Exp $ */
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: version.c,v 1.1 2001/03/05 16:53:14 wiz Exp $");
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001 Thomas Klausner. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by Thomas Klausner for
|
||||
* the NetBSD Project.
|
||||
* 4. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "lib.h"
|
||||
#include "version.h"
|
||||
|
||||
void
|
||||
show_version(void)
|
||||
{
|
||||
printf("%s\n", PKGTOOLS_VERSION);
|
||||
exit (0);
|
||||
}
|
||||
|
43
usr.sbin/pkg_install/lib/version.h
Normal file
43
usr.sbin/pkg_install/lib/version.h
Normal file
@ -0,0 +1,43 @@
|
||||
/* $NetBSD: version.h,v 1.1 2001/03/05 16:53:14 wiz Exp $ */
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: version.h,v 1.1 2001/03/05 16:53:14 wiz Exp $");
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001 Thomas Klausner. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by Thomas Klausner for
|
||||
* the NetBSD Project.
|
||||
* 4. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _INST_LIB_VERSION_H_
|
||||
#define _INST_LIB_VERSION_H_
|
||||
|
||||
#define PKGTOOLS_VERSION "20010305"
|
||||
|
||||
#endif /* _INST_LIB_VERSION_H_ */
|
Loading…
x
Reference in New Issue
Block a user