1*a24fe59cSnia.\" $NetBSD: pkg_info.1,v 1.4 2021/04/10 19:49:59 nia Exp $ 2af21abb5Sjoerg.\" 3af21abb5Sjoerg.\" FreeBSD install - a package for the installation and maintenance 4af21abb5Sjoerg.\" of non-core utilities. 5af21abb5Sjoerg.\" 6af21abb5Sjoerg.\" Redistribution and use in source and binary forms, with or without 7af21abb5Sjoerg.\" modification, are permitted provided that the following conditions 8af21abb5Sjoerg.\" are met: 9af21abb5Sjoerg.\" 1. Redistributions of source code must retain the above copyright 10af21abb5Sjoerg.\" notice, this list of conditions and the following disclaimer. 11af21abb5Sjoerg.\" 2. Redistributions in binary form must reproduce the above copyright 12af21abb5Sjoerg.\" notice, this list of conditions and the following disclaimer in the 13af21abb5Sjoerg.\" documentation and/or other materials provided with the distribution. 14af21abb5Sjoerg.\" 15af21abb5Sjoerg.\" Jordan K. Hubbard 16af21abb5Sjoerg.\" 17af21abb5Sjoerg.\" 18af21abb5Sjoerg.\" @(#)pkg_info.1 19af21abb5Sjoerg.\" 209476c0f2Sjoerg.Dd January 11, 2015 21af21abb5Sjoerg.Dt PKG_INFO 1 22af21abb5Sjoerg.Os 23af21abb5Sjoerg.Sh NAME 24af21abb5Sjoerg.Nm pkg_info 25af21abb5Sjoerg.Nd a utility for displaying information on software packages 26af21abb5Sjoerg.Sh SYNOPSIS 27af21abb5Sjoerg.Nm 280e7c8822Sjoerg.Op Fl BbcDdFfhIikLmNnpqRrSsVvX 2956afc4eeSwiz.Op Fl E Ar pkg-name 3056afc4eeSwiz.Op Fl e Ar pkg-name 31af21abb5Sjoerg.Op Fl K Ar pkg_dbdir 32af21abb5Sjoerg.Op Fl l Ar prefix 33af21abb5Sjoerg.Ar pkg-name ... 34af21abb5Sjoerg.Nm 35af21abb5Sjoerg.Op Fl a | Fl u 36af21abb5Sjoerg.Op flags 37af21abb5Sjoerg.Nm 38af21abb5Sjoerg.Op Fl Q Ar variable 39af21abb5Sjoerg.Ar pkg-name ... 40af21abb5Sjoerg.Sh DESCRIPTION 41af21abb5SjoergThe 42af21abb5Sjoerg.Nm 43af21abb5Sjoergcommand is used to dump out information for packages, which may be either 44af21abb5Sjoergpacked up in files or already installed on the system with the 45af21abb5Sjoerg.Xr pkg_create 1 46af21abb5Sjoergcommand. 47af21abb5Sjoerg.Pp 48af21abb5SjoergThe 49af21abb5Sjoerg.Ar pkg-name 5040613e04Sprlw1may be the name of an installed package (with or without version), a 51af21abb5Sjoergpattern matching several installed packages (see the 52af21abb5Sjoerg.Sx PACKAGE WILDCARDS 53af21abb5Sjoergsection for a description of possible patterns), 54af21abb5Sjoergthe pathname to a 55af21abb5Sjoergbinary package, a filename belonging to an installed 5656afc4eeSwizpackage (with 5756afc4eeSwiz.Fl F ) , 5856afc4eeSwizor a URL to an FTP-available package. 59af21abb5Sjoerg.Pp 6056afc4eeSwizThe following command line options are available: 61af21abb5Sjoerg.Bl -tag -width indent 62af21abb5Sjoerg.It Fl a 63af21abb5SjoergShow information for all currently installed packages. 64af21abb5SjoergSee also 65af21abb5Sjoerg.Fl u . 6656afc4eeSwizWhen neither 6756afc4eeSwiz.Fl a 6856afc4eeSwiznor 6956afc4eeSwiz.Fl u 7056afc4eeSwizis given, the former is assumed. 71af21abb5Sjoerg.It Fl B 72af21abb5SjoergShow some of the important definitions used when building 73af21abb5Sjoergthe binary package (the 74af21abb5Sjoerg.Dq Build information ) 75af21abb5Sjoergfor each package. 76af21abb5SjoergAdditionally, any installation information variables 77af21abb5Sjoerg(lowercase) can be queried, too. 78af21abb5SjoergIn particular, 79af21abb5Sjoerg.Ar automatic 80af21abb5Sjoergtells if a package was installed automatically 81af21abb5Sjoergas a dependency of another package. 82af21abb5Sjoerg.It Fl b 83af21abb5SjoergShow the 84af21abb5Sjoerg.Nx 85af21abb5SjoergRCS Id strings from the files used in the construction 8656afc4eeSwizof the binary package (the 8756afc4eeSwiz.Dq Build version ) 8856afc4eeSwizfor each package. 89af21abb5SjoergThese files are the package Makefile, any patch files, any checksum 90af21abb5Sjoergfiles, and the packing list file. 91af21abb5Sjoerg.It Fl c 92af21abb5SjoergShow the one-line comment field for each package. 93af21abb5Sjoerg.It Fl D 94af21abb5SjoergShow the install-message file (if any) for each package. 95af21abb5Sjoerg.It Fl d 96af21abb5SjoergShow the long-description field for each package. 97af21abb5Sjoerg.It Fl E Ar pkg-name 98af21abb5SjoergThis option 99af21abb5Sjoergallows you to test for the existence of a given package. 100af21abb5SjoergIf a package identified by 101af21abb5Sjoerg.Ar pkg-name 102af21abb5Sjoergis currently installed, return code is 0, otherwise 1. 103af21abb5SjoergThe name of the best matching package found installed is printed to 104af21abb5Sjoergstdout unless turned off using the 105af21abb5Sjoerg.Fl q 106af21abb5Sjoergoption. 107af21abb5Sjoerg.Ar pkg-name 108af21abb5Sjoergcan contain wildcards (see the 109af21abb5Sjoerg.Sx PACKAGE WILDCARDS 110af21abb5Sjoergsection below). 111af21abb5Sjoerg.It Fl e Ar pkg-name 112af21abb5SjoergThis option 113af21abb5Sjoergallows you to test for the existence of a given package. 114af21abb5SjoergIf a package identified by 115af21abb5Sjoerg.Ar pkg-name 116af21abb5Sjoergis currently installed, return code is 0, otherwise 1. 117af21abb5SjoergThe names of any package(s) found installed are printed to 118af21abb5Sjoergstdout unless turned off using the 119af21abb5Sjoerg.Fl q 120af21abb5Sjoergoption. 121af21abb5Sjoerg.Ar pkg-name 122af21abb5Sjoergcan contain wildcards (see the 123af21abb5Sjoerg.Sx PACKAGE WILDCARDS 124af21abb5Sjoergsection below). 125af21abb5Sjoerg.It Fl F 12656afc4eeSwizInterpret any 12756afc4eeSwiz.Ar pkg-name 12856afc4eeSwizgiven as filename, and query information on the package that 12956afc4eeSwizfile belongs to. 13056afc4eeSwizThis can be used to query information on a per-file basis. 13156afc4eeSwizSee the 13256afc4eeSwiz.Sx TECHNICAL DETAILS 13356afc4eeSwizsection below for more information. 134af21abb5Sjoerg.It Fl f 135af21abb5SjoergShow the packing list instructions for each package. 13656afc4eeSwiz.It Fl h 13756afc4eeSwizPrint usage message and exit. 138af21abb5Sjoerg.It Fl I 139af21abb5SjoergShow the index entry for each package. 14056afc4eeSwizThis option is assumed when no arguments or relevant flags are specified. 141af21abb5Sjoerg.It Fl i 142af21abb5SjoergShow the install script (if any) for each package. 143af21abb5Sjoerg.It Fl K Ar pkg_dbdir 1445ac0fc9cSjoergOverride the value of the 1455ac0fc9cSjoerg.Dv PKG_DBDIR 1465ac0fc9cSjoergconfiguration option with the value 1475ac0fc9cSjoerg.Ar pkg_dbdir . 148af21abb5Sjoerg.It Fl k 149af21abb5SjoergShow the de-install script (if any) for each package. 150af21abb5Sjoerg.It Fl L 151af21abb5SjoergShow the files within each package. 152af21abb5SjoergThis is different from just viewing the packing list, since full pathnames 153af21abb5Sjoergfor everything are generated. 154af21abb5SjoergFiles that were created dynamically during installation of the package 155af21abb5Sjoergare not listed. 15656afc4eeSwiz.It Fl l Ar prefix 157af21abb5SjoergPrefix each information category header (see 158af21abb5Sjoerg.Fl q ) 159af21abb5Sjoergshown with 16056afc4eeSwiz.Ar prefix . 161af21abb5SjoergThis is primarily of use to front-end programs that want to request a 162af21abb5Sjoerglot of different information fields at once for a package, but don't 163af21abb5Sjoergnecessary want the output intermingled in such a way that they can't 164af21abb5Sjoergorganize it. 165af21abb5SjoergThis lets you add a special token to the start of each field. 166af21abb5Sjoerg.It Fl m 167af21abb5SjoergShow the mtree file (if any) for each package. 168af21abb5Sjoerg.It Fl N 169af21abb5SjoergShow which packages each package was built with (exact dependencies), if any. 170af21abb5Sjoerg.It Fl n 171af21abb5SjoergShow which packages each package needs (depends upon), if any. 172af21abb5Sjoerg.It Fl p 173af21abb5SjoergShow the installation prefix for each package. 17456afc4eeSwiz.It Fl Q Ar variable 175af21abb5SjoergShow the definition of 176af21abb5Sjoerg.Ar variable 177af21abb5Sjoergfrom the build information for each package. 178af21abb5SjoergAn empty string is returned if no such variable definition is found for 179af21abb5Sjoergthe package(s). 180af21abb5Sjoerg.It Fl q 181af21abb5SjoergBe 182af21abb5Sjoerg.Dq quiet 183af21abb5Sjoergin emitting report headers and such, just dump the 184af21abb5Sjoergraw info (basically, assume a non-human reading). 185af21abb5Sjoerg.It Fl R 186af21abb5SjoergFor each package, show the packages that require it. 187bae4fdf1Sjoerg.It Fl r 188bae4fdf1SjoergFor each package, show the packages that require it. 189bae4fdf1SjoergContinue recursively to show all dependents. 190af21abb5Sjoerg.It Fl S 191af21abb5SjoergShow the size of this package and all the packages it requires, 192af21abb5Sjoergin bytes. 193af21abb5Sjoerg.It Fl s 194af21abb5SjoergShow the size of this package in bytes. 195af21abb5SjoergThe size is calculated by adding up the size of each file of the package. 196af21abb5Sjoerg.It Fl u 19756afc4eeSwizShow information for all user-installed packages: 19856afc4eeSwizautomatically installed packages (as dependencies 199af21abb5Sjoergof other packages) are not displayed. 200af21abb5SjoergSee also 201af21abb5Sjoerg.Fl a . 202af21abb5Sjoerg.It Fl V 203af21abb5SjoergPrint version number and exit. 204af21abb5Sjoerg.It Fl v 205af21abb5SjoergTurn on verbose output. 206af21abb5Sjoerg.It Fl X 207af21abb5SjoergPrint summary information for each package. 208af21abb5SjoergThe summary format is 209af21abb5Sjoergdescribed in 210af21abb5Sjoerg.Xr pkg_summary 5 . 211af21abb5SjoergIts primary use is to contain all information about the contents of a 212af21abb5Sjoerg(remote) binary package repository needed by package managing software. 213af21abb5Sjoerg.El 214af21abb5Sjoerg.Sh TECHNICAL DETAILS 215af21abb5SjoergPackage info is either extracted from package files named on the 216af21abb5Sjoergcommand line, or from already installed package information 217af21abb5Sjoergin 2185ac0fc9cSjoerg.Pa \*[Lt]PKG_DBDIR\*[Gt]/\*[Lt]pkg-name\*[Gt] . 219af21abb5Sjoerg.Pp 22056afc4eeSwizWhen the 221af21abb5Sjoerg.Fl F 22256afc4eeSwizoption is used, 22356afc4eeSwiza filename can be given instead of a package name to query 22456afc4eeSwizinformation on the (installed) package that file belongs to. 22556afc4eeSwizThe filename is resolved to a package name using the package database. 22656afc4eeSwizThe filename must be absolute, as in the output of 22756afc4eeSwiz.Dl pkg_info -aF . 22856afc4eeSwizFor example, 2299476c0f2Sjoerg.Dl pkg_info -Fe /path/to/file 23056afc4eeSwizcan be used to display the package the given file belongs to, and 23156afc4eeSwiz.Dl pkg_info -LF /path/to/file 23256afc4eeSwizcan be used to display all files belonging to the package the given 23356afc4eeSwizfile belongs to. 234af21abb5Sjoerg.Sh PACKAGE WILDCARDS 23556afc4eeSwizIn the places where a package name/version is expected, e.g., for the 236af21abb5Sjoerg.Fl e 23756afc4eeSwizoption, several forms can be used. 238af21abb5SjoergEither use a package name with or without version, or specify a 239af21abb5Sjoergpackage wildcard that gets matched against all installed packages. 240af21abb5Sjoerg.Pp 241af21abb5SjoergPackage wildcards use 242af21abb5Sjoerg.Xr fnmatch 3 . 243af21abb5SjoergIn addition, 244af21abb5Sjoerg.Xr csh 1 245af21abb5Sjoergstyle {,} alternates have been implemented. 246af21abb5SjoergPackage version numbers can also be matched in a relational manner 247af21abb5Sjoergusing the 24856afc4eeSwiz.Dq \*[Ge] , 24956afc4eeSwiz.Dq \*[Le] , 25056afc4eeSwiz.Dq \*[Gt] , 251af21abb5Sjoergand 25256afc4eeSwiz.Dq \*[Lt] 253af21abb5Sjoergoperators. 254af21abb5SjoergFor example, 25556afc4eeSwiz.Dl pkg_info -e 'name\*[Ge]1.3' 256af21abb5Sjoergwill match versions 1.3 and later of the 25756afc4eeSwiz.Dq name 258af21abb5Sjoergpackage. 25956afc4eeSwiz(Make sure to use shell quoting.) 26056afc4eeSwizAdditionally, ranges can be defined, by giving both a lower bound 26156afc4eeSwiz.Po with 26256afc4eeSwiz.Dq \*[Gt] 26356afc4eeSwizor 26456afc4eeSwiz.Dq \*[Ge] 26556afc4eeSwiz.Pc 26656afc4eeSwizas well as an upper bound 26756afc4eeSwiz.Po with 26856afc4eeSwiz.Dq \*[Lt] 26956afc4eeSwizor 27056afc4eeSwiz. Dq \*[Le] 27156afc4eeSwiz.Pc . 272af21abb5SjoergThe lower bound has to come first. 273af21abb5SjoergFor example, 27456afc4eeSwiz.Dl pkg_info -e 'name\*[Ge]1.3\*[Lt]2.0' 27556afc4eeSwizwill match versions 1.3 (inclusive) to 2.0 (exclusive) of package 27656afc4eeSwiz.Dq name . 277af21abb5Sjoerg.Pp 278af21abb5SjoergThe collating sequence of the various package version numbers is 279af21abb5Sjoergunusual, but strives to be consistent. 280af21abb5SjoergThe magic string 281af21abb5Sjoerg.Dq alpha 282af21abb5Sjoergequates to 28356afc4eeSwiz.Dq alpha version , 284af21abb5Sjoergand sorts before a beta version. 285af21abb5SjoergThe magic string 286af21abb5Sjoerg.Dq beta 287af21abb5Sjoergequates to 28856afc4eeSwiz.Dq beta version , 289af21abb5Sjoergand sorts before a release candidate. 290af21abb5SjoergThe magic string 291af21abb5Sjoerg.Dq rc 292af21abb5Sjoergequates to 29356afc4eeSwiz.Dq release candidate , 294af21abb5Sjoergand sorts before a release. 295af21abb5SjoergThe magic string 296af21abb5Sjoerg.Dq pre , 297af21abb5Sjoergshort for 298af21abb5Sjoerg.Dq pre-release , 299af21abb5Sjoergis a synonym for 300af21abb5Sjoerg.Dq rc . 301af21abb5SjoergFor example, 30256afc4eeSwiz.Dq name-1.3alpha2 303af21abb5Sjoergwill sort before 30456afc4eeSwiz.Dq name-1.3beta1 , 305af21abb5Sjoergand they both sort before 30656afc4eeSwiz.Dq name-1.3rc1 . 30756afc4eeSwizSimilarly, 30856afc4eeSwiz.Dq name-1.3rc3 30956afc4eeSwizwill sort before 31056afc4eeSwiz.Dq name-1.3 , 31156afc4eeSwizand after 31256afc4eeSwiz.Dq name-1.2.9 . 313af21abb5SjoergThe magic string 314af21abb5Sjoerg.Dq pl 31556afc4eeSwizequates to 31656afc4eeSwiz.Dq patch level , 31756afc4eeSwizand has the same value as a dot 31856afc4eeSwiz.Pq Sq \&. 31956afc4eeSwizin the dewey-decimal ordering schemes, 3200e7c8822Sjoergas does the underscore 32156afc4eeSwiz.Pq Sq _ . 32256afc4eeSwizAdditionally, alphabetic characters sort in the same place as 32356afc4eeSwiztheir numeric counterparts, so that 32456afc4eeSwiz.Dq name-1.2e 32556afc4eeSwizhas the same sorting value as 32656afc4eeSwiz.Dq name-1.2.5 . 327af21abb5Sjoerg.Sh ENVIRONMENT 3285ac0fc9cSjoergSee 3295ac0fc9cSjoerg.Xr pkg_install.conf 5 3305ac0fc9cSjoergfor options, that can also be specified using the environment. 331af21abb5Sjoerg.Sh SEE ALSO 332af21abb5Sjoerg.Xr pkg_add 1 , 333af21abb5Sjoerg.Xr pkg_admin 1 , 334af21abb5Sjoerg.Xr pkg_create 1 , 335af21abb5Sjoerg.Xr pkg_delete 1 , 3365ac0fc9cSjoerg.Xr pkg_install.conf 5 3375ac0fc9cSjoerg.Xr pkgsrc 7 338af21abb5Sjoerg.Sh AUTHORS 339af21abb5Sjoerg.Bl -tag -width indent -compact 340af21abb5Sjoerg.It "Jordan Hubbard" 341af21abb5Sjoergmost of the work 342af21abb5Sjoerg.It "John Kohl" 343af21abb5Sjoergrefined it for 344af21abb5Sjoerg.Nx 345af21abb5Sjoerg.It "Hubert Feyrer" 346af21abb5Sjoerg.Nx 347af21abb5Sjoergwildcard dependency processing, pkgdb, depends displaying, 34856afc4eeSwizpkg size display, and more. 349af21abb5Sjoerg.El 350