summaryrefslogtreecommitdiffstats
path: root/man/dpkg-trigger.pod
blob: bf4b8377696559b28a4685cafd764154f9e54504 (plain)
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
# dpkg manual page - dpkg-trigger(1)
#
# Copyright © 2008-2015 Guillem Jover <guillem@debian.org>
#
# This is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <https://www.gnu.org/licenses/>.

=encoding utf8

=head1 NAME

dpkg-trigger - a package trigger utility

=head1 SYNOPSIS

B<dpkg-trigger>
[I<option>...] I<trigger-name>

B<dpkg-trigger>
[I<option>...] I<command>

=head1 DESCRIPTION

B<dpkg-trigger> is a tool to explicitly activate triggers and check
for its support on the running B<dpkg>.

This can be used by maintainer scripts in complex and conditional
situations where the file triggers, or the declarative B<activate>
triggers control file directive, are insufficiently rich.
It can also
be used for testing and by system administrators (but note that the
triggers won't actually be run by B<dpkg-trigger>).

Unrecognized trigger name syntaxes are an error for B<dpkg-trigger>.

This program was introduced in dpkg 1.14.17.

=head1 COMMANDS

=over

=item B<--check-supported>

Check if the running B<dpkg> supports triggers (usually called from a
postinst).
Will exit B<0> if a triggers-capable B<dpkg> has run,
or B<1> with an error message to stderr if not.
Normally, however,
it is better just to activate the desired trigger with B<dpkg-trigger>.

=item B<-?>, B<--help>

Show the usage message and exit.

=item B<--version>

Show the version and exit.

=back

=head1 OPTIONS

=over

=item B<--admindir=>I<dir>

Change the location of the B<dpkg> database.
Defaults to I<%ADMINDIR%> if B<DPKG_ADMINDIR> has not been set.

=item B<--root=>I<directory>

Set the root directory to I<directory>, which sets the administrative
directory to «I<directory>%ADMINDIR%» (since dpkg 1.21.0).

=item B<--by-package=>I<package>

Override trigger awaiter (normally set by B<dpkg> through the
B<DPKG_MAINTSCRIPT_PACKAGE> environment variable of the maintainer scripts,
naming the package to which the script belongs, and this will be used
by default).

=item B<--no-await>

This option arranges that the calling package I<T> (if any) need not await
the processing of this trigger; the interested package(s) I<I>, will not be
added to I<T>'s trigger processing awaited list and I<T>'s status is unchanged.
I<T> may be considered installed even though I<I> may not yet have
processed the trigger.

=item B<--await>

This option does the inverse of B<--no-await> (since dpkg 1.17.21).
If the interested package has declared a “noawait” directive, then this
option will not be effective.
It is currently the default behavior.

=item B<--no-act>

Just test, do not actually change anything.

=back

=head1 EXIT STATUS

=over

=item B<0>

The requested action was successfully performed.
Or a check or assertion command returned true.

=item B<1>

A check or assertion command returned false.

=item B<2>

Fatal or unrecoverable error due to invalid command-line usage, or
interactions with the system, such as accesses to the database,
memory allocations, etc.

=back

=head1 ENVIRONMENT

=over

=item B<DPKG_ROOT>

If set and the B<--root> option has not been specified, it will be used as
the filesystem root directory (since dpkg 1.21.0).

=item B<DPKG_ADMINDIR>

If set and the B<--admindir> option has not been specified, it will
be used as the B<dpkg> data directory.

=item B<DPKG_DEBUG>

Sets the debug mask (since dpkg 1.21.10) from an octal value.
The currently accepted flags are described in the B<dpkg --debug> option,
but not all these flags might have an effect on this program.

=item B<DPKG_COLORS>

Sets the color mode (since dpkg 1.18.5).
The currently accepted values are: B<auto> (default), B<always> and
B<never>.

=back

=head1 SEE ALSO

L<dpkg(1)>,
L<deb-triggers(5)>,
B<%PKGDOCDIR%/spec/triggers.txt>.