forked from freebsd/pkg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpkg-lock.8
180 lines (180 loc) · 4.33 KB
/
pkg-lock.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
.\"
.\" 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
.\"
.Dd April 14, 2015
.Dt PKG-LOCK 8
.Os
.Sh NAME
.Nm "pkg lock" ,
.Nm "pkg unlock"
.Nd lock or unlock packages
.Sh SYNOPSIS
.Nm
.Op Fl lqy
.Op Fl a
.Nm
.Op Fl lqy
.Op Fl Cgix
.Ar pkg-name
.Nm "pkg unlock"
.Op Fl lqy
.Op Fl a
.Nm "pkg unlock"
.Op Fl lqy
.Op Fl Cgix
.Ar pkg-name
.Pp
.Nm
.Op Cm --{show-locked,quiet,yes}
.Op Cm --all
.Nm
.Fl -has-locked-packages
.Nm
.Op Cm --{show-locked,quiet,yes}
.Op Cm --{case-sensitive,glob,case-insensitive,regex}
.Ar pkg-name
.Nm "pkg unlock"
.Op Cm --{show-locked,quiet,yes}
.Op Cm --all
.Nm "pkg unlock"
.Op Cm --{show-locked,quiet,yes}
.Op Cm --{case-sensitive,glob,case-insensitive,regex}
.Ar pkg-name
.Sh DESCRIPTION
.Nm
is used to lock packages against reinstallation,
modification or deletion.
.Nm "pkg unlock"
unlocks the named packages.
Either variant only has an effect on currently installed packages.
Consequently it is impossible to block installation of a new package
by using this mechanism, unless such an installation implies updating
a locked package.
.Pp
The impact of locking a package is wider than simply preventing
modifications to the package itself.
.Cm Any
operation implying modification of the locked package will be
blocked.
This includes:
.Pp
.Bl -bullet -compact
.It
Attempts to reinstall, up- or downgrade or delete the locked package
itself.
.It
Installation, up- or downgrade of a package where the resultant
package would have a dependency on a different version of the locked
package.
.It
Deletion, up- or downgrade of any package the locked package depends
upon, either directly or as a consequence of installing or upgrading
some third package.
.El
.Sh OPTIONS
The following options are supported by
.Nm :
.Bl -tag -width all
.It Fl a , Fl --all
Lock or unlock all installed packages.
.It Fl C , Fl -case-sensitive
Make the standard or the regular expression
.Fl ( x )
matching against
.Ar pkg-name
case sensitive.
.It Fl g , Fl -glob
Treat
.Ar pkg-name
as a shell glob pattern.
.It Fl i , Fl -case-insensitive
Make the standard or the regular expression
.Fl ( x )
matching against
.Ar pkg-name
case insensitive.
This is the default, unless modified by setting
.Ev CASE_SENSITIVE_MATCH
to true in
.Pa pkg.conf .
.It Fl l , Fl -show-locked
Show a list of all locked packages.
This can be used without locking or unlocking any packages, in which
case privileged access to the package database is not required.
Otherwise it will be displayed after any lock or unlock operations.
.It Fl q , Fl -quiet
Operate quietly: do not output anything other than confirmatory questions.
.It Fl x , Fl -regex
Treat
.Ar pkg-name
as a regular expression according to the "modern" or "extended" syntax
of
.Xr re_format 7 .
.It Fl y , Fl -yes
Assume "yes" as the answer to all questions.
.It Fl -has-locked-packages
Return 0 if at least one package is locked, 1 otherwise
.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
.It Ev DEFAULT_ALWAYS_YES
.It Ev ASSUME_ALWAYS_YES
.It Ev CASE_SENSITIVE_MATCH
.El
.Sh FILES
See
.Xr pkg.conf 5 .
.Sh SEE ALSO
.Xr pkg_printf 3 ,
.Xr pkg_repos 3 ,
.Xr pkg-repository 5 ,
.Xr pkg.conf 5 ,
.Xr pkg 8 ,
.Xr pkg-add 8 ,
.Xr pkg-alias 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-config 8 ,
.Xr pkg-create 8 ,
.Xr pkg-delete 8 ,
.Xr pkg-fetch 8 ,
.Xr pkg-info 8 ,
.Xr pkg-install 8 ,
.Xr pkg-query 8 ,
.Xr pkg-register 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-ssh 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