1.\" $OpenBSD: pkg_info.1,v 1.49 2014/02/11 10:36:13 espie Exp $ 2.\" 3.\" Documentation and design originally from FreeBSD. All the code has 4.\" been rewritten since. We keep the documentation's notice: 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright 10.\" notice, this list of conditions and the following disclaimer. 11.\" 2. Redistributions in binary form must reproduce the above copyright 12.\" notice, this list of conditions and the following disclaimer in the 13.\" documentation and/or other materials provided with the distribution. 14.\" 15.\" Jordan K. Hubbard 16.\" 17.\" 18.Dd $Mdocdate: February 11 2014 $ 19.Dt PKG_INFO 1 20.Os 21.Sh NAME 22.Nm pkg_info 23.Nd display information on software packages 24.Sh SYNOPSIS 25.Nm pkg_info 26.Bk -words 27.Op Fl AaCcdfIKLMmPqRSstUv 28.Op Fl E Ar filename 29.Op Fl e Ar pkg-name 30.Op Fl l Ar str 31.Op Fl Q Ar query 32.Op Fl r Ar pkgspec 33.Op Ar pkg-name 34.Op Ar ... 35.Ek 36.Sh DESCRIPTION 37The 38.Nm 39command is used to dump out information for packages, as created by 40.Xr pkg_create 1 , 41which may be still 42packed up or already installed on the system with the 43.Xr pkg_add 1 44command. 45.Pp 46The 47.Ar pkg-name 48may be the name of an installed package, the pathname to a package 49distribution file, or a URL to a package available through FTP, HTTP, HTTPS, 50or SCP. 51.Nm 52will try to complete 53.Ar pkg-name 54with a version number while looking through installed packages. 55.Pp 56When browsing through uninstalled packages, running 57.Ic pkg_info -I *.tgz 58will report a summary line for each package, so that it is possible to 59run 60.Ic pkg_info pkgname.tgz 61to obtain a longer package description, and 62.Ic pkg_add -n pkgname.tgz 63to check that the installation would proceed cleanly, including dependencies. 64.Pp 65The following command-line options are supported: 66.Bl -tag -width indent 67.It Fl A 68Show information for all currently installed packages, 69including internal packages. 70.It Fl a 71Show information for all currently installed packages. 72.It Fl C 73Show certificate information for signed packages. 74.It Fl c 75Show the one-line comment field for each package. 76.It Fl d 77Show the long-description field for each package. 78.It Fl E Ar filename 79Look for the package(s) that contains the given 80.Ar filename . 81As a faster alternative, note that there is a package, pkglocatedb, that 82contains a 83.Xr locate 1 84database of every file in every package. 85.It Fl e Ar pkg-name 86This option 87allows you to test for the presence of another (perhaps 88prerequisite) package from a script. 89If the package identified by 90.Ar pkg-name 91is not currently installed, return 0, otherwise return 1. 92In addition, the names of any package(s) found installed are printed to 93stdout unless turned off using the 94.Fl q 95option. 96.Pp 97The given 98.Ar pkg-name 99is actually a package specification, as described in 100.Xr packages-specs 7 . 101For example, 102.Ic pkg_info -e 'name->=1.3' 103will match versions 1.3 and later of the 104.Pa name 105package. 106.It Fl e Ar pkgpath 107Another variant of this option that uses a pkgpath instead. 108A pkgpath is a location within the ports tree, as described 109in 110.Xr pkgpath 7 . 111For example, 112.Ic pkg_info -e x11/kde/base3 113will match any package that was compiled according to 114.Pa ${PORTSDIR}/x11/kde/base3 . 115.It Fl f 116Show the packing-list instructions for each package. 117See 118.Xr pkg_create 1 119and 120.Xr package 5 121for the various annotations. 122.It Fl I 123Show the index entry for each package. 124.It Fl K 125Prefix file names with category keyword (e.g., @file, @lib). 126Always used together with 127.Fl L . 128.It Fl L 129Show the files within each package. 130This is different from just 131viewing the packing-list, since full pathnames for everything 132are generated. 133.It Fl l Ar str 134Prefix each information category header (see 135.Fl q ) 136shown with 137.Ar str . 138This is primarily of use to front-end programs that want to request a 139lot of different information fields at once for a package, but don't 140necessarily want the output intermingled in such a way that they can't 141organize it. 142This lets you add a special token to the start of each field. 143.It Fl M 144Show the install-message file (if any) for each package. 145.It Fl m 146Only show packages tagged as manual installations. 147It should omit anything 148installed automatically as a dependency. 149.It Fl P 150Show the 151.Xr pkgpath 7 152for each package. 153You can easily build a subdirlist with this. 154.It Fl Q Ar query 155Show all packages in $PKG_PATH which match the given 156.Ar query . 157.It Fl q 158Be 159.Dq quiet 160in emitting report headers and such, just dump the 161raw info (basically, assume a non-human reading). 162.It Fl R 163Show which packages require a given package. 164.It Fl r Ar pkgspec 165Check a list for a given 166.Ar pkgspec . 167The following arguments are names of packages to verify. 168Exit status will be augmented by 2 if none of the packages do match. 169.It Fl S 170Show the update signature for each package. 171The 172.Sq update signature 173is a unique tag showing the package name, and the version number 174of every run time dependency and shared library used to build this package. 175.It Fl s 176Show an estimate of the total size of each package. 177.It Fl t 178Show packages which are not required by any other packages. 179.It Fl U 180Show the deinstall-message file (if any) for each package. 181.It Fl v 182Turn on verbose output. 183.El 184.Sh ENVIRONMENT 185.Bl -tag -width PKG_TMPDIR 186.It Ev PKG_DBDIR 187The standard package database directory, 188.Pa /var/db/pkg , 189can be overridden by specifying an alternative directory in the 190.Ev PKG_DBDIR 191environment variable. 192.It Ev PKG_PATH 193This can be used to specify a colon-separated list of paths to search for 194package files. 195The current directory is always searched first, even if 196.Ev PKG_PATH 197is set. 198If 199.Ev PKG_PATH 200is used, the suffix 201.Dq .tgz 202is automatically appended to the 203.Ar pkg-name , 204whereas searching in the current directory uses 205.Ar pkg-name 206literally. 207.It Ev PKG_TMPDIR 208Temporary area where package information files will be extracted, instead of 209.Pa /var/tmp . 210.El 211.Sh TECHNICAL DETAILS 212Package info is either extracted from package files named on the 213command line, or from already installed package information 214in 215.Pa /var/db/pkg/<pkg-name> . 216.Sh SEE ALSO 217.Xr pkg_add 1 , 218.Xr pkg_create 1 , 219.Xr pkg_delete 1 , 220.Xr bsd.port.mk 5 , 221.Xr package 5 , 222.Xr pkg.conf 5 , 223.Xr packages-specs 7 , 224.Xr pkgpath 7 225.Sh AUTHORS 226.Bl -tag -width indent -compact 227.It "Jordan Hubbard" 228initial design 229.It "Marc Espie" 230complete rewrite 231.El 232