man: Improve description for dpkg-build-api v1 items
[dpkg.git] / man / dpkg-trigger.pod
blobf6f400711fc47d07575a4385fa6dc8a6cd2509c8
1 # dpkg manual page - dpkg-trigger(1)
3 # Copyright © 2008-2015 Guillem Jover <guillem@debian.org>
5 # This is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
10 # This is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
18 =encoding utf8
20 =head1 NAME
22 dpkg-trigger - a package trigger utility
24 =head1 SYNOPSIS
26 B<dpkg-trigger>
27 [I<option>...] I<trigger-name>
29 B<dpkg-trigger>
30 [I<option>...] I<command>
32 =head1 DESCRIPTION
34 B<dpkg-trigger> is a tool to explicitly activate triggers and check
35 for its support on the running B<dpkg>.
37 This can be used by maintainer scripts in complex and conditional
38 situations where the file triggers, or the declarative B<activate>
39 triggers control file directive, are insufficiently rich. It can also
40 be used for testing and by system administrators (but note that the
41 triggers won't actually be run by B<dpkg-trigger>).
43 Unrecognized trigger name syntaxes are an error for B<dpkg-trigger>.
45 This program was introduced in dpkg 1.14.17.
47 =head1 COMMANDS
49 =over
51 =item B<--check-supported>
53 Check if the running B<dpkg> supports triggers (usually called from a
54 postinst). Will exit B<0> if a triggers-capable B<dpkg> has run,
55 or B<1> with an error message to stderr if not. Normally, however,
56 it is better just to activate the desired trigger with B<dpkg-trigger>.
58 =item B<-?>, B<--help>
60 Show the usage message and exit.
62 =item B<--version>
64 Show the version and exit.
66 =back
68 =head1 OPTIONS
70 =over
72 =item B<--admindir=>I<dir>
74 Change the location of the B<dpkg> database.
75 Defaults to I<%ADMINDIR%> if B<DPKG_ADMINDIR> has not been set.
77 =item B<--root=>I<directory>
79 Set the root directory to I<directory>, which sets the administrative
80 directory to «I<directory>%ADMINDIR%» (since dpkg 1.21.0).
82 =item B<--by-package=>I<package>
84 Override trigger awaiter (normally set by B<dpkg> through the
85 B<DPKG_MAINTSCRIPT_PACKAGE> environment variable of the maintainer scripts,
86 naming the package to which the script belongs, and this will be used
87 by default).
89 =item B<--no-await>
91 This option arranges that the calling package I<T> (if any) need not await
92 the processing of this trigger; the interested package(s) I<I>, will not be
93 added to I<T>'s trigger processing awaited list and I<T>'s status is unchanged.
94 I<T> may be considered installed even though I<I> may not yet have
95 processed the trigger.
97 =item B<--await>
99 This option does the inverse of B<--no-await> (since dpkg 1.17.21).
100 If the interested package has declared a “noawait” directive, then this
101 option will not be effective.
102 It is currently the default behavior.
104 =item B<--no-act>
106 Just test, do not actually change anything.
108 =back
110 =head1 EXIT STATUS
112 =over
114 =item B<0>
116 The requested action was successfully performed.
117 Or a check or assertion command returned true.
119 =item B<1>
121 A check or assertion command returned false.
123 =item B<2>
125 Fatal or unrecoverable error due to invalid command-line usage, or
126 interactions with the system, such as accesses to the database,
127 memory allocations, etc.
129 =back
131 =head1 ENVIRONMENT
133 =over
135 =item B<DPKG_ROOT>
137 If set and the B<--root> option has not been specified, it will be used as
138 the filesystem root directory (since dpkg 1.21.0).
140 =item B<DPKG_ADMINDIR>
142 If set and the B<--admindir> option has not been specified, it will
143 be used as the B<dpkg> data directory.
145 =item B<DPKG_DEBUG>
147 Sets the debug mask (since dpkg 1.21.10) from an octal value.
148 The currently accepted flags are described in the B<dpkg --debug> option,
149 but not all these flags might have an effect on this program.
151 =item B<DPKG_COLORS>
153 Sets the color mode (since dpkg 1.18.5).
154 The currently accepted values are: B<auto> (default), B<always> and
155 B<never>.
157 =back
159 =head1 SEE ALSO
161 L<dpkg(1)>,
162 L<deb-triggers(5)>,
163 B<%PKGDOCDIR%/spec/triggers.txt>.