-
Notifications
You must be signed in to change notification settings - Fork 277
/
pkg-register.8
187 lines (187 loc) · 4.71 KB
/
pkg-register.8
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
.\"
.\" FreeBSD pkg - a next generation package for the installation and maintenance
.\" of non-core utilities.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\"
.\"
.\" @(#)pkg.8
.\" $FreeBSD$
.\"
.Dd April 14, 2013
.Dt PKG-REGISTER 8
.Os
.Sh NAME
.Nm "pkg register"
.Nd registers a package into the local package database
.Sh SYNOPSIS
.Nm
.Op Fl dlOt
.Op Fl f Ar plist-file
.Fl m Ar metadatadir
.Fl i Ar input-path
.Nm
.Op Fl dlOt
.Fl M Ar metadatafile
.Sh DESCRIPTION
.Nm
is used for registering a package into the local package database.
.Pp
.Nm
assembles a full set of package meta-data from various possible inputs,
and writes the meta-data into the package registry database.
This is one of the final steps when installing software from ports:
the package files are installed into the filesystem, and then
.Nm
is called to record what was installed into the package database.
.Pp
.Nm
can derive package meta-data from a number of different sources:
.Bl -bullet
.It
The package manifest
.It
The metadata directory
.It
Direct analysis of files installed by the package
.El
.Pp
The package manifest is a
.Cm YAML
format listing of package meta-data.
It can contain all of the necessary meta-data needed by the package,
but the more usual approach is to provide selected items via the
manifest, and fill in the rest, either from legacy files such as
.Fa pkg-plist ,
.Fa +DESC,
.Fa +DISPLAY,
.Fa +MESSAGE
or
.Fa +MTREE_DIRS
which are optional and mostly located in the
.Ar metadatadir
given as the argument to the
.Fl m
option.
.Pp
Other information about shared library requirements and the packages
necessary to provide them may be obtained by direct analysis of the
files installed by the package.
This is the mechanism currently used when installing software directly
from the ports tree, as it provides reasonable backwards compatibility
with the old style
.Xr pkg_add 1
command.
.Pp
Reading in a complete and comprehensive manifest from one file is a
simpler alternative, but requires all the meta-data to have been
assembled beforehand.
.Pp
Direct analysis of the installed files can be suppressed by use of
the
.Fl t
option.
This is intended for testing the functionality of
.Xr pkg 8
itself, and should not be routinely used.
.Sh OPTIONS
The following options are supported by
.Nm :
.Bl -tag -width F1
.It Fl d
Mark the package to be automatically removed if no other packages
depend on it.
For more information please refer to
.Xr pkg-autoremove 8
.It Fl f Ar plist-file
Specifies a
.Fa pkg-plist
style packing list file
.It Fl i Ar input-path
Specifies the package input path or staging directory.
.It Fl l
Tells
.Nm
to generate an old-style package registry entry in a sub-directory of
.Sy $PKG_DBDIR
rather than updating the
.Fa local.sqlite
database.
.It Fl M Ar manifest
Specifies the package manifest file.
Use of this option means that the only file which will be used as a
source of package meta-data is the named
.Ar manifest
file.
The
.Fl M
option is mutually exclusive with
.Fl m .
.It Fl m Ar metadatadir
Specifies the meta data directory to use when registering the package.
This directory will hold the package manifest, and optionally may contain
a number of other old-style metadata input files.
The
.Fl m
option is mutually exclusive with
.Fl M .
.It Fl t
Enable testing mode.
This allows
.Nm
to update the package database without performing any of the usual
analyses of files installed by the package.
This option should only be used with caution, and preferably only
for the intended purpose of performing regression tests on
.Xr pkg 8
itself.
.El
.Sh ENVIRONMENT
The following environment variables affect the execution of
.Nm .
See
.Xr pkg.conf 5
for further description.
.Bl -tag -width ".Ev NO_DESCRIPTIONS"
.It Ev PKG_DBDIR
.El
.Sh FILES
See
.Xr pkg.conf 5 .
.Sh SEE ALSO
.Xr pkg.conf 5 ,
.Xr pkg 8 ,
.Xr pkg-add 8 ,
.Xr pkg-annotate 8 ,
.Xr pkg-audit 8 ,
.Xr pkg-autoremove 8 ,
.Xr pkg-backup 8 ,
.Xr pkg-check 8 ,
.Xr pkg-clean 8 ,
.Xr pkg-convert 8 ,
.Xr pkg-create 8 ,
.Xr pkg-delete 8 ,
.Xr pkg-fetch 8 ,
.Xr pkg-info 8 ,
.Xr pkg-install 8 ,
.Xr pkg-lock 8 ,
.Xr pkg-query 8 ,
.Xr pkg-repo 8 ,
.Xr pkg-rquery 8 ,
.Xr pkg-search 8 ,
.Xr pkg-set 8 ,
.Xr pkg-shell 8 ,
.Xr pkg-shlib 8 ,
.Xr pkg-stats 8 ,
.Xr pkg-update 8 ,
.Xr pkg-updating 8 ,
.Xr pkg-upgrade 8 ,
.Xr pkg-version 8 ,
.Xr pkg-which 8