1 .\" $NetBSD: pkg_view.1,v 1.13 2010/01/22 13:30:42 joerg Exp $
3 .\" Copyright (c) 2003 The NetBSD Foundation, Inc.
4 .\" All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
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 .\" 3. All advertising materials mentioning features or use of this software
15 .\" must display the following acknowledgement:
16 .\" This product includes software developed by the NetBSD
17 .\" Foundation, Inc. and its contributors.
18 .\" 4. Neither the name of The NetBSD Foundation nor the names of its
19 .\" contributors may be used to endorse or promote products derived
20 .\" from this software without specific prior written permission.
22 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
23 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
24 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
25 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
26 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32 .\" POSSIBILITY OF SUCH DAMAGE.
39 .Nd add and delete instances of depoted packages in views
53 command is used to add and delete instances of depoted packages in
64 command may execute scripts or programs provided by a package file,
65 your system may be susceptible to
68 attacks from miscreants who create dangerous package files.
70 You are advised to verify the competence and identity of those who
71 provide installable package files.
72 For extra protection, examine all the package control files in the
73 package database directory
74 .Pa ( /usr/pkg/packages/\*[Lt]pkg-name\*[Gt]/ ) .
75 Pay particular attention to any
79 files, and inspect the
89 directives, and/or use the
91 command to examine the installed package control files.
94 The following command-line options are supported:
95 .Bl -tag -width indent
99 as the directory in which the depoted packages can be found.
100 If this option isn't specified, then the
102 is taken from the value of the environment variable
104 if it's set, otherwise the default
113 to the list of files in
115 that should ignored when adding or removing the package instance from
117 .It Fl k Ar pkg_dbdir
118 Override the value of the
120 configuration option with the value
122 This is used as as the package database directory for the
123 default (empty) view.
125 Don't actually execute the commands for manipulating the package instances.
127 Print the version number and exit.
129 Turn on verbose output.
132 multiple times increases the level of verbosity.
136 as the directory in which all the views are managed.
141 but may be overridden by the
143 environment variable.
149 in which the package instances should be added or deleted.
152 is the empty view but may be overridden by the
154 environment variable.
157 The following commands are supported:
158 .Bl -tag -width indent
160 Add the listed package instances into
163 Check whether the listed package instances are present in
165 If they are not present, then return 0, otherwise return 1.
167 Delete the listed package instances from
171 .Bl -tag -width indent
173 This is the location of the
175 directory inside which all depoted packages are kept.
183 This is the location of the
185 directory in which all the views are managed.
193 flag isn't given, then the value of the environment variable
195 is the package database directory for the default view,
196 otherwise it defaults to
198 .It Ev PLIST_IGNORE_FILES
199 This can be used to specify files in
201 that should ignored when adding or removing the package instance from
203 .Ev PLIST_IGNORE_FILES
204 is a space-separated list of shell glob patterns that match files relative
207 depot directory, and it defaults to "info/dir *[~#] *.OLD *.orig *,v".
208 This is overridden by any
209 .Ev _PLIST_IGNORE_FILES
210 setting in a package's
216 The default view can be specified in the
218 environment variable.
221 .Bl -tag -width indent
222 .It Pa \*[Lt]pkg-dbdir\*[Gt]/\*[Lt]package\*[Gt]/+INSTALL
223 If the package contains an
227 then after the package instance is added into a view, the script is
228 executed with the following arguments:
229 .Bl -tag -width package
231 The name of the package instance being added.
233 Keyword denoting that the script is to perform any actions needed after
234 the package instance is added to a view.
239 script exits with a non-zero status code, the installation is terminated.
240 .It Pa \*[Lt]pkg-dbdir\*[Gt]/\*[Lt]package\*[Gt]/+DEINSTALL
241 If the package contains an
245 then before the package instance is deleted from a view, the script is
246 executed with the following arguments:
247 .Bl -tag -width package
249 The name of the package instance being deleted.
250 .It Cm VIEW-DEINSTALL
251 Keyword denoting that the script is to perform any actions needed before
252 the package instance is deleted from a view.
257 script exits with a non-zero status code, the de-installation is terminated.
264 scripts are called with the environment variable
266 set to the path to the
275 utility was written by
276 .An Alistair G. Crooks Aq agc@NetBSD.org .