forked from NetBSDfr/pkgin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pkgin.1
350 lines (340 loc) · 9.5 KB
/
pkgin.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "PKGIN" "1" "August 2015" "" ""
.
.SH "NAME"
\fBpkgin\fR \- A tool to manage pkgsrc binary packages\.
.
.SH "SYNOPSIS"
\fBpkgin\fR [\fB\-dfFhpPvVyn\fR] [\fB\-l\fR \fIlimit_chars\fR] [\fB\-c\fR \fIchroot_path\fR] [\fB\-t\fR \fIlog_file\fR] \fIcommand\fR [package \.\.\.]
.
.SH "DESCRIPTION"
The pkgin command is aimed at being an \fBapt\fR / \fByum\fR like tool for managing pkgsrc(7) binary packages\. It relies on pkg_summary(5) for installation, removal and upgrade of packages and associated dependencies, using a remote repository\.
.
.SH "OPTIONS"
The following command line arguments are supported:
.
.TP
\fB\-c\fR chroot_path
Enable chrooting pkgin in the given repository
.
.TP
\fB\-d\fR
Download only
.
.TP
\fB\-f\fR
Force database update
.
.TP
\fB\-F\fR
Force package reinstall
.
.TP
\fB\-h\fR
Displays help for the command
.
.TP
\fB\-l\fR \fIlimit_chars\fR
Only include the packages with the specified \fISTATUS FLAGS\fR
.
.TP
\fB\-n\fR
Assumes "no" as default answer and print results of actions to be taken line per line
.
.TP
\fB\-p\fR
Displays results in a parsable format
.
.TP
\fB\-P\fR
Displays packages versions instead of globs (sd, sfd, srd)
.
.TP
\fB\-t\fR log_file
Logs package browsing (dependencies and impact) to a given log file
.
.TP
\fB\-v\fR
Displays pkgin version
.
.TP
\fB\-V\fR
Be verbose when (un)installing
.
.TP
\fB\-y\fR
Assumes "yes" as default answer, except for autoremove
.
.P
The \fBpkgin\fR utility provides several commands:
.
.TP
\fBautoremove\fR
Automatically removes orphan dependencies\. When used with the \fB\-n\fR flag, it can be used to show packages that are possibly not necessary\.
.
.TP
\fBavail\fR
Lists all packages available in the repository\.
.
.TP
\fBclean\fR
Delete downloaded packages from the cache directory\.
.
.TP
\fBexport\fR
Export the list of non\-autoremovable packages to stdout (one category/package by line)
.
.TP
\fBfull\-upgrade\fR
Upgrade all packages to their newer versions present in the repository\.
.
.TP
\fBimport\fR \fIfile\fR
Import a list of packages to be installed from file (one category/package by line)
.
.TP
\fBinstall\fR \fIpackage|glob\fR \.\.\.
Performs installation or upgrade of package\. If more than one packages are specified on the command\-line, all will be installed (or upgraded)\. Instead of a package name, a glob can be specified in order to install specific versions\.
.
.IP
Exemple:
.
.IP
pkgin in \'mysql\-server>5\.1<5\.6\'
.
.TP
\fBkeep\fR \fIpackage\fR \.\.\.
Marks package as "non auto\-removable"\. A \fBkeep\fR\-able package is equivalent to a non\-automatic package in pkgsrc(7) terminology\.
.
.TP
\fBlist\fR
Lists all packages installed locally on a system\. If the l modifier is added to this command, show only packages matching the status flag\.
.
.TP
\fBpkg\-content\fR \fIpackage\fR
Show remote package content\.
.
.TP
\fBpkg\-descr\fR \fIpackage\fR
Show remote package long\-description\.
.
.TP
\fBpkg\-build\-defs\fR \fIpackage\fR
Show remote package build definitions\.
.
.TP
\fBprovides\fR \fIpackage\fR
Shows what a package provides to others
.
.TP
\fBremove\fR \fIpackage\fR \.\.\.
Removes package as well as all packages depending on it\. When more than one package are specified, they will all be uninstalled\. By default, it will prompt you to confirm before package removals\.
.
.TP
\fBrequires\fR \fIpackage\fR
Shows what a package requires from others packages\.
.
.TP
\fBsearch\fR \fIpattern\fR
Performs a regular expression search for a pattern in the repository\.
.
.TP
\fBshow\-deps\fR
Displays all direct dependencies
.
.TP
\fBshow\-full\-deps\fR \fIpackage\fR
Displays all direct dependencies recursively
.
.TP
\fBshow\-rev\-deps\fR \fIpackage\fR
Displays all reverse direct dependencies for package\. If more than one package is specified, pkgin will show recursively reverse direct dependencies for all packages on the command\-line\.
.
.TP
\fBshow\-category\fR \fIcategory\fR
Show packages belonging to category\.
.
.TP
\fBshow\-pkg\-category\fR \fIpackage\fR
Show package category\.
.
.TP
\fBshow\-keep\fR
Display "non auto\-removable" packages\.
.
.TP
\fBshow\-no\-keep\fR
Display "auto\-removable" packages\.
.
.TP
\fBunkeep\fR \fIpackage\fR \.\.\.
Marks package as "auto\-removable"\. If no other package depends on it, it will be removed when using the autoremove modifier\. It is equivalent to an \fBautomatic\fR package in pkgsrc(7) terminology\.
.
.TP
\fBupdate\fR
Creates and populates the initial database of locally installed packages and available packages (from the remote pkg_summary(5) list)\. This is done automatically when pkgin is first used, when the system package database has been modified\. or when pkgin is upgraded to a new database version\.
.
.TP
\fBupgrade\fR
Upgrade keepable packages to their newer versions present in the repository\. If the installed dependencies match the listed needed dependencies, don\'t upgrade them\. For a complete packages upgrade, \fBfull\-upgrade\fR shall be used\.
.
.SH "STATUS FLAGS"
When using the \fB\-l\fR flag along with the list command, the following status flag must be set:
.
.TP
\fB=\fR
The installed version of the package is current\.
.
.TP
\fB<\fR
The installed version of the package is older than the current version\.
.
.TP
\fB>\fR
The installed version of the package is newer than the current version\.
.
.SH "ENVIRONMENT"
\fBPKG_REPOS\fR The \fBPKG_REPOS\fR environment variable can be pointed to a suitable repository or a list of space separated repositories in order to override </usr/pkg/etc/pkgin/repositories\.conf>
.
.SH "FILES"
.
.TP
\fI/usr/pkg/etc/pkgin/repositories\.conf\fR
This file contains a list of repository URIs that pkgin will use\. It may contain macros \fB$arch\fR to define the machine hardware platform and \fB$osrelease\fR to define the release version for the operating system (as reported by uname(3))\.
.
.TP
\fI/usr/pkg/etc/pkgin/preferred\.conf\fR
This files contains a list of preferences regarding packages to be installed or upgraded\. Each line defines a package preference taking the form of a simple glob(3)\.
.
.IP
Example:
.
.IP
mysql\-server<5\.6
.
.br
php>=5\.4
.
.br
autoconf=2\.69\.*
.
.TP
\fI/var/db/pkgin\fR
This directory contains component needed by \fBpkgin\fR at run time\. This directory can be completely emptied if \fBpkgin\fR\'s database gets corrupted, \fBpkgin\fR will rebuild its database based on \fBpkg_install\fR\'s \fBPKG_DB\fR next time it is called\.
.
.TP
\fI/var/db/pkgin/cache\fR
This directory contains the packages downloaded by \fBpkgin\fR\. It is safe to empty it regularily using \fBpkgin clean\fR or simply \fBrm \-rf /var/db/pkgin/cache\fR\.
.
.TP
\fI/var/db/pkgin/pkgin\.db\fR
\fIpkgin\.db\fR is the main \fBpkgin\fR \fBSQLite\fR database\. This format have been chosen in order to parse, query, match and order packages using the \fBSQL\fR language thus making packages list manipulation a lot easier\.
.
.TP
\fI/var/db/pkgin/pkg_install\-err\.log\fR
This file contains errors and warnings given by pkg_add(1) and pkg_delete(1), which are the tools called by \fBpkgin\fR to manipulate packages themselves\.
.
.TP
\fI/var/db/pkgin/sql\.log\fR
This file contains \fBSQL\fR errors that might have occurred on a \fBSQLite\fR query\. Mainly for debugging purposes\.
.
.SH "EXAMPLES"
.
.nf
Setup the initial database:
# echo ftp://ftp\.fr\.netbsd\.org/pub/pkgsrc/packages/NetBSD/i386/5\.0/All > /usr/pkg/etc/pkgin/repositories\.conf
# pkgin update
processing local summary\.\.\.
updating database: 100%
downloading pkg_summary\.bz2: 100%
processing remote summary (ftp://ftp\.fr\.netbsd\.org/pub/pkgsrc/packages/NetBSD/i386/5\.0/All)\.\.\.
updating database: 100%
Listing all packages available in the repository:
# pkgin avail | more
[\.\.\.]
autoconf\-2\.63 Generates automatic source code configuration scripts
aumix\-gtk\-2\.8nb3 Set mix levels (ncurses and GTK+ 2\.0 interfaces)
aumix\-2\.8nb7 Set mix levels (ncurses interface only)
august\-0\.63b Simple Tk\-based HTML editor
audacity\-1\.2\.6nb3 Audio editor
[\.\.\.]
Install packages and their dependencies:
# pkgin install links eterm
nothing to upgrade\.
11 packages to be installed: tiff\-3\.8\.2nb4 png\-1\.2\.35 libungif\-4\.1\.4nb1 libltdl\-1\.5\.26 jpeg\-6bnb4 pcre\-7\.8 perl\-5\.10\.0nb5 libast\-0\.6\.1nb3 imlib2\-1\.4\.2nb1 links\-2\.2nb1 eterm\-0\.9\.4nb1 (25M to download, 64M to install)
proceed ? [y/N]
Remove packages and their reverse dependencies:
# pkgin remove links eterm
2 packages to delete: links\-2\.2nb1 eterm\-0\.9\.4nb1
proceed ? [y/N]
Remove orphan dependencies:
# pkgin autoremove
in order to remove packages from the autoremove list, flag those with the \-k modifier\.
9 packages to be autoremoved: libast\-0\.6\.1nb3 pcre\-7\.8 imlib2\-1\.4\.2nb1 tiff\-3\.8\.2nb4 png\-1\.2\.35 libungif\-4\.1\.4nb1 libltdl\-1\.5\.26 perl\-5\.10\.0nb5 jpeg\-6bnb4
proceed ? [y/N]
.
.fi
.
.SH "SEE ALSO"
pkg_add(1), pkg_info(1), pkg_summary(5), pkgsrc(7)
.
.SH "AUTHORS"
.
.TP
Emile \fBiMil\fR Heitor
Initial work and ongoing development\.
.
.SH "CONTRIBUTORS"
.
.TP
Jeremy C\. Reed
Testing and refinements\.
.
.TP
Arnaud Ysmal
Tests and patches
.
.TP
Claude Charpentier
SQLite schema, and SQL queries debugging\.
.
.TP
Guillaume Lasmayous
Man page
.
.TP
Antonio Huete Jimenez
DragonFly port
.
.TP
Min Sik Kim
Darwin port
.
.TP
Filip Hajny
SunOS port
.
.TP
Baptiste Daroussin
FreeBSD port and patches
.
.TP
Gautam B\.T\.
MINIX port
.
.TP
Thomas \fBwiz\fR Klausner
Testing and refinements\.
.
.TP
Youri \fByrmt\fR Mouton
OSX testing and patches
.
.TP
Jonathan Perkin
Performance improvements and patches\.
.
.SH "BUGS"
We\'re hunting them\.