Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/pkg_install/dist Import pkg_install from curren...
details: https://anonhg.NetBSD.org/src/rev/87642d7679cf
branches: trunk
changeset: 786229:87642d7679cf
user: wiz <wiz%NetBSD.org@localhost>
date: Sat Apr 20 15:26:52 2013 +0000
description:
Import pkg_install from current pkgsrc.
Licence changes and less warnings when opsys doesn't match build
host opsys version, and documentation updates.
diffstat:
external/bsd/pkg_install/dist/admin/pkg_admin.1 | 8 +-
external/bsd/pkg_install/dist/info/main.c | 6 +-
external/bsd/pkg_install/dist/info/pkg_info.1 | 154 +++++++++------
external/bsd/pkg_install/dist/lib/pkg_install.conf.5.in | 16 +-
4 files changed, 109 insertions(+), 75 deletions(-)
diffs (truncated from 394 to 300 lines):
diff -r 398d4d4baa10 -r 87642d7679cf external/bsd/pkg_install/dist/admin/pkg_admin.1
--- a/external/bsd/pkg_install/dist/admin/pkg_admin.1 Sat Apr 20 13:32:40 2013 +0000
+++ b/external/bsd/pkg_install/dist/admin/pkg_admin.1 Sat Apr 20 15:26:52 2013 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: pkg_admin.1,v 1.1.1.11 2010/06/26 00:14:27 joerg Exp $
+.\" $NetBSD: pkg_admin.1,v 1.1.1.12 2013/04/20 15:26:52 wiz Exp $
.\"
.\" Copyright (c) 1999-2010 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -34,7 +34,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd June 16, 2010
+.Dd December 14, 2012
.Dt PKG_ADMIN 1
.Os
.Sh NAME
@@ -257,7 +257,9 @@
.Ar pattern ,
otherwise returns false.
.It Cm rebuild
-Rebuild the package database mapping from scratch.
+Rebuild the package database mapping from scratch, using the
+.Pa +CONTENTS
+files of the installed packages.
This option is only intended for recovery after system crashes
during package installation and removal.
.It Cm rebuild-tree
diff -r 398d4d4baa10 -r 87642d7679cf external/bsd/pkg_install/dist/info/main.c
--- a/external/bsd/pkg_install/dist/info/main.c Sat Apr 20 13:32:40 2013 +0000
+++ b/external/bsd/pkg_install/dist/info/main.c Sat Apr 20 15:26:52 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.1.1.8 2010/01/30 21:33:36 joerg Exp $ */
+/* $NetBSD: main.c,v 1.1.1.9 2013/04/20 15:26:53 wiz Exp $ */
#if HAVE_CONFIG_H
#include "config.h"
@@ -7,7 +7,7 @@
#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
#endif
-__RCSID("$NetBSD: main.c,v 1.1.1.8 2010/01/30 21:33:36 joerg Exp $");
+__RCSID("$NetBSD: main.c,v 1.1.1.9 2013/04/20 15:26:53 wiz Exp $");
/*
*
@@ -55,7 +55,7 @@
usage(void)
{
fprintf(stderr, "%s\n%s\n%s\n%s\n",
- "usage: pkg_info [-BbcDdFfhIikLmNnpqrRSsVvX] [-e package] [-E package]",
+ "usage: pkg_info [-BbcDdFfhIikLmNnpqRrSsVvX] [-E pkg-name] [-e pkg-name]",
" [-K pkg_dbdir] [-l prefix] pkg-name ...",
" pkg_info [-a | -u] [flags]",
" pkg_info [-Q variable] pkg-name ...");
diff -r 398d4d4baa10 -r 87642d7679cf external/bsd/pkg_install/dist/info/pkg_info.1
--- a/external/bsd/pkg_install/dist/info/pkg_info.1 Sat Apr 20 13:32:40 2013 +0000
+++ b/external/bsd/pkg_install/dist/info/pkg_info.1 Sat Apr 20 15:26:52 2013 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: pkg_info.1,v 1.1.1.5 2010/04/23 20:54:09 joerg Exp $
+.\" $NetBSD: pkg_info.1,v 1.1.1.6 2013/04/20 15:26:53 wiz Exp $
.\"
.\" FreeBSD install - a package for the installation and maintenance
.\" of non-core utilities.
@@ -17,7 +17,7 @@
.\"
.\" @(#)pkg_info.1
.\"
-.Dd February 27, 2010
+.Dd December 14, 2012
.Dt PKG_INFO 1
.Os
.Sh NAME
@@ -26,8 +26,8 @@
.Sh SYNOPSIS
.Nm
.Op Fl BbcDdFfhIikLmNnpqRrSsVvX
-.Op Fl e Ar package
-.Op Fl E Ar package
+.Op Fl E Ar pkg-name
+.Op Fl e Ar pkg-name
.Op Fl K Ar pkg_dbdir
.Op Fl l Ar prefix
.Ar pkg-name ...
@@ -53,16 +53,21 @@
section for a description of possible patterns),
the pathname to a
binary package, a filename belonging to an installed
-package (if
-.Fl F
-is also given), or a URL to an ftp-available package.
+package (with
+.Fl F ) ,
+or a URL to an FTP-available package.
.Pp
-The following command-line options are supported:
+The following command line options are available:
.Bl -tag -width indent
.It Fl a
Show information for all currently installed packages.
See also
.Fl u .
+When neither
+.Fl a
+nor
+.Fl u
+is given, the former is assumed.
.It Fl B
Show some of the important definitions used when building
the binary package (the
@@ -78,7 +83,9 @@
Show the
.Nx
RCS Id strings from the files used in the construction
-of the binary package (the "Build version") for each package.
+of the binary package (the
+.Dq Build version )
+for each package.
These files are the package Makefile, any patch files, any checksum
files, and the packing list file.
.It Fl c
@@ -116,16 +123,21 @@
.Sx PACKAGE WILDCARDS
section below).
.It Fl F
-Interpret any pkg-name given as filename, and translate it to a
-package name using the package database.
-This can be used to query information on a per-file basis, e.g. in
-conjunction with the
-.Fl e
-flag to find out which package a file belongs to.
+Interpret any
+.Ar pkg-name
+given as filename, and query information on the package that
+file belongs to.
+This can be used to query information on a per-file basis.
+See the
+.Sx TECHNICAL DETAILS
+section below for more information.
.It Fl f
Show the packing list instructions for each package.
+.It Fl h
+Print usage message and exit.
.It Fl I
Show the index entry for each package.
+This option is assumed when no arguments or relevant flags are specified.
.It Fl i
Show the install script (if any) for each package.
.It Fl K Ar pkg_dbdir
@@ -141,11 +153,11 @@
for everything are generated.
Files that were created dynamically during installation of the package
are not listed.
-.It Fl l Ar str
+.It Fl l Ar prefix
Prefix each information category header (see
.Fl q )
shown with
-.Ar str .
+.Ar prefix .
This is primarily of use to front-end programs that want to request a
lot of different information fields at once for a package, but don't
necessary want the output intermingled in such a way that they can't
@@ -159,7 +171,7 @@
Show which packages each package needs (depends upon), if any.
.It Fl p
Show the installation prefix for each package.
-.It Fl Q
+.It Fl Q Ar variable
Show the definition of
.Ar variable
from the build information for each package.
@@ -182,8 +194,8 @@
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 u
-Show information for all user-installed packages.
-Automatically installed packages (as dependencies
+Show information for all user-installed packages:
+automatically installed packages (as dependencies
of other packages) are not displayed.
See also
.Fl a .
@@ -205,18 +217,24 @@
in
.Pa \*[Lt]PKG_DBDIR\*[Gt]/\*[Lt]pkg-name\*[Gt] .
.Pp
-A filename can be given instead of a (installed) package name to query
-information on the package this file belongs to.
-This filename is then resolved to a package name using the package database.
-For this translation to take place, the
+When the
.Fl F
-flag must be given.
-The filename must be absolute, compare the output of pkg_info
-.Fl aF .
+option is used,
+a filename can be given instead of a package name to query
+information on the (installed) package that file belongs to.
+The filename is resolved to a package name using the package database.
+The filename must be absolute, as in the output of
+.Dl pkg_info -aF .
+For example,
+.Dl pkg_info -eF /path/to/file
+can be used to display the package the given file belongs to, and
+.Dl pkg_info -LF /path/to/file
+can be used to display all files belonging to the package the given
+file belongs to.
.Sh PACKAGE WILDCARDS
-In the places where a package name/version is expected, e.g. for the
+In the places where a package name/version is expected, e.g., for the
.Fl e
-switch, several forms can be used.
+option, several forms can be used.
Either use a package name with or without version, or specify a
package wildcard that gets matched against all installed packages.
.Pp
@@ -227,40 +245,52 @@
style {,} alternates have been implemented.
Package version numbers can also be matched in a relational manner
using the
-.Pa \*[Ge] , \*[Le] , \*[Gt] ,
+.Dq \*[Ge] ,
+.Dq \*[Le] ,
+.Dq \*[Gt] ,
and
-.Pa \*[Lt]
+.Dq \*[Lt]
operators.
For example,
-.Pa pkg_info -e 'name\*[Ge]1.3'
+.Dl pkg_info -e 'name\*[Ge]1.3'
will match versions 1.3 and later of the
-.Pa name
+.Dq name
package.
-Additionally, ranges can be defined by giving a lower bound with
-\*[Gt] or \*[Ge] and an upper bound with \*[Lt] or \*[Le].
+(Make sure to use shell quoting.)
+Additionally, ranges can be defined, by giving both a lower bound
+.Po with
+.Dq \*[Gt]
+or
+.Dq \*[Ge]
+.Pc
+as well as an upper bound
+.Po with
+.Dq \*[Lt]
+or
+. Dq \*[Le]
+.Pc .
The lower bound has to come first.
For example,
-.Pa pkg_info -e 'name\*[Ge]1.3\*[Lt]2.0'
-will match versions 1.3 (inclusive) to 2.0 (exclusive)
-of package
-.Pa name .
+.Dl pkg_info -e 'name\*[Ge]1.3\*[Lt]2.0'
+will match versions 1.3 (inclusive) to 2.0 (exclusive) of package
+.Dq name .
.Pp
The collating sequence of the various package version numbers is
unusual, but strives to be consistent.
The magic string
.Dq alpha
equates to
-.Pa alpha version
+.Dq alpha version ,
and sorts before a beta version.
The magic string
.Dq beta
equates to
-.Pa beta version
+.Dq beta version ,
and sorts before a release candidate.
The magic string
.Dq rc
equates to
-.Pa release candidate
+.Dq release candidate ,
and sorts before a release.
The magic string
.Dq pre ,
@@ -269,29 +299,31 @@
is a synonym for
.Dq rc .
For example,
-.Pa name-1.3rc3
-will sort before
-.Pa name-1.3
-and after
-.Pa name-1.2.9 .
-Similarly
-.Pa name-1.3alpha2
+.Dq name-1.3alpha2
will sort before
-.Pa name-1.3beta1
+.Dq name-1.3beta1 ,
and they both sort before
Home |
Main Index |
Thread Index |
Old Index