1 .\" $NetBSD: pkg_view.1,v 1.11 2007/07/26 11:30:56 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
120 as the package database directory for the default (empty) view.
121 If this option isn't specified, then the package database directory is
122 taken from the value of the environment variable
124 otherwise it defaults to
127 Don't actually execute the commands for manipulating the package instances.
129 Print the version number and exit.
131 Turn on verbose output.
134 multiple times increases the level of verbosity.
138 as the directory in which all the views are managed.
143 but may be overridden by the
145 environment variable.
151 in which the package instances should be added or deleted.
154 is the empty view but may be overridden by the
156 environment variable.
159 The following commands are supported:
160 .Bl -tag -width indent
162 Add the listed package instances into
165 Check whether the listed package instances are present in
167 If they are not present, then return 0, otherwise return 1.
169 Delete the listed package instances from
173 .Bl -tag -width indent
175 This is the location of the
177 directory inside which all depoted packages are kept.
185 This is the location of the
187 directory in which all the views are managed.
195 flag isn't given, then the value of the environment variable
197 is the package database directory for the default view,
198 otherwise it defaults to
200 .It Ev PLIST_IGNORE_FILES
201 This can be used to specify files in
203 that should ignored when adding or removing the package instance from
205 .Ev PLIST_IGNORE_FILES
206 is a space-separated list of shell glob patterns that match files relative
209 depot directory, and it defaults to "info/dir *[~#] *.OLD *.orig *,v".
210 This is overridden by any
211 .Ev _PLIST_IGNORE_FILES
212 setting in a package's
218 The default view can be specified in the
220 environment variable.
223 .Bl -tag -width indent
224 .It Pa \*[Lt]pkg-dbdir\*[Gt]/\*[Lt]package\*[Gt]/+INSTALL
225 If the package contains an
229 then after the package instance is added into a view, the script is
230 executed with the following arguments:
231 .Bl -tag -width package
233 The name of the package instance being added.
235 Keyword denoting that the script is to perform any actions needed after
236 the package instance is added to a view.
241 script exits with a non-zero status code, the installation is terminated.
242 .It Pa \*[Lt]pkg-dbdir\*[Gt]/\*[Lt]package\*[Gt]/+DEINSTALL
243 If the package contains an
247 then before the package instance is deleted from a view, the script is
248 executed with the following arguments:
249 .Bl -tag -width package
251 The name of the package instance being deleted.
252 .It Cm VIEW-DEINSTALL
253 Keyword denoting that the script is to perform any actions needed before
254 the package instance is deleted from a view.
259 script exits with a non-zero status code, the de-installation is terminated.
266 scripts are called with the environment variable
268 set to the path to the
277 utility was written by
278 .An Alistair G. Crooks Aq agc@NetBSD.org .