.\" $NetBSD: pkg_admin.1,v 1.8 2000/05/08 22:48:42 hubertf Exp $ .\" .\" Copyright (c) 1999 Hubert Feyrer. 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 Hubert Feyrer 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. .\" .Dd May 4th, 2000 .Dt pkg_admin 1 .Os .Sh NAME .Nm pkg_admin .Nd perform various administrative tasks to the pkg system. .Sh SYNOPSIS .Nm "" .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 Cm rebuild Rebuild the package database mapping from scratch, scanning subdirectories in .Pa /var/db/pkg for .Pa +CONTENTS files, parsing them and writing the resulting absolute pathnames together with the package they belong to into the package database. .Pp This option is intended to be used for upgrading from non-pkgdb-pkg_* tools to pkgdb-pkg_* tools, further manipulation of the pkgdb will be done by .Xr pkg_add 1 , .Xr pkg_delete 1 and .Xr pkg_create 1 . .Pp Needs to be run as root. .Pp .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 noted in their +CONTENTS files. If no additional argument is given, the files of all installed packages are installed, else only the named packages will be ckecked (wildcards can be used here, see .Xr pkg_info 1 ). .Pp The packages' +CONTENTS files will be parsed and the MD5 checksum will be checked for every file found. A warning message is printed if the expected checksum differs from the checksum of the file on disk. .Pp .It Cm dump Dump the contents of the package database, similar to .Cm pkg_info -F . Columns are printed for the keyfield used in the pkgdb - the filename -, and the data field - the package the file belongs to. .It Cm lsall /dir/pkgpattern .It Cm lsbest /dir/pkgpattern List all/best package matching pattern in the given directory. Can be used to work around limitations of /bin/sh and other filename globbing mechanisms. This option implemente matching of pkg-wildcards against arbitrary files, useful mainly in the build system itself. See .Xr pkg_info 1 for a description of the pattern. Example: .Bd -literal yui# cd /usr/pkgsrc/packages/i386ELF/All/ yui# ls unzip* unzip-5.40.tgz unzip-5.41.tgz yui# pkg_admin lsall 'unzip*' unzip-5.40.tgz unzip-5.41.tgz yui# pkg_admin lsall 'unzip>=5.40' unzip-5.40.tgz unzip-5.41.tgz yui# pkg_admin lsall 'unzip>=5.41' unzip-5.41.tgz yui# pkg_admin lsbest 'unzip>=5.40' unzip-5.41.tgz yui# pkg_admin lsall /usr/pkgsrc/packages/i386ELF/All/'{mit,unproven}-pthread*' /usr/pkgsrc/packages/i386ELF/All/mit-pthreads-1.60b6.tgz /usr/pkgsrc/packages/i386ELF/All/unproven-pthreads-0.15.tgz .Ed .El .Pp .Sh ENVIRONMENT .Ss PKG_DBDIR Where to register packages instead of .Pa /var/db/pkg . .Sh FILES .Bl -tag -width /var/db/pkg/pkgdb.byfile.db -compact .It Pa /var/db/pkg/pkgdb.byfile.db .It Pa /var/db/pkg//+CONTENTS .El .Sh SEE ALSO .Xr pkg_add 1 , .Xr pkg_delete 1 , .Xr pkg_info 1 , .Xr pkg_create 1 . .Sh AUTHOR The .Nm command was written by Hubert Feyrer. .Sh HISTORY The .Nm command first appeared in .Nx 1.4.