dpkg (1.18.25) stretch; urgency=medium
[dpkg] / man / dpkg-trigger.man
CommitLineData
1479465f
GJ
1.\" dpkg manual page - dpkg-trigger(1)
2.\"
3.\" Copyright © 2008-2015 Guillem Jover <guillem@debian.org>
4.\"
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.
9.\"
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.
14.\"
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/>.
17.
18.TH dpkg\-trigger 1 "%RELEASE_DATE%" "%VERSION%" "dpkg suite"
19.nh
20.SH NAME
21dpkg\-trigger \- a package trigger utility
22.
23.SH SYNOPSIS
24.B dpkg\-trigger
25.RI [ option "...] " trigger-name
26.br
27.B dpkg\-trigger
28.RI [ option "...] " command
29.
30.SH DESCRIPTION
31\fBdpkg\-trigger\fP is a tool to explicitly activate triggers and check
32for its support on the running \fBdpkg\fP.
33.PP
34This can be used by maintainer scripts in complex and conditional
35situations where the file triggers, or the declarative \fBactivate\fP
36triggers control file directive, are insufficiently rich. It can also
37be used for testing and by system administrators (but note that the
38triggers won't actually be run by \fBdpkg\-trigger\fP).
39.PP
40Unrecognized trigger name syntaxes are an error for \fBdpkg\-trigger\fP.
41.
42.SH COMMANDS
43.TP
44.BR \-\-check\-supported
45Check if the running \fBdpkg\fP supports triggers (usually called from a
46postinst). Will exit \fB0\fP if a triggers-capable \fBdpkg\fP has run,
47or \fB1\fP with an error message to stderr if not. Normally, however,
48it is better just to activate the desired trigger with \fBdpkg\-trigger\fP.
49.TP
50.BR \-? ", " \-\-help
51Show the usage message and exit.
52.TP
53.B \-\-version
54Show the version and exit.
55.
56.SH OPTIONS
57.TP
58.BI \-\-admindir= dir
59Change the location of the \fBdpkg\fR database. The default location is
60\fI%ADMINDIR%\fP.
61.TP
62.BR \-\-by\-package=\fIpackage\fR
63Override trigger awaiter (normally set by \fBdpkg\fP through the
64\fBDPKG_MAINTSCRIPT_PACKAGE\fP environment variable of the maintainer scripts,
65naming the package to which the script belongs, and this will be used
66by default).
67.TP
68.BR \-\-no\-await
69This option arranges that the calling package T (if any) need not await
70the processing of this trigger; the interested package(s) I, will not be
71added to T's trigger processing awaited list and T's status is unchanged.
72T may be considered installed even though I may not yet have processed
73the trigger.
74.TP
75.BR \-\-await
76This option does the inverse of \fB\-\-no\-await\fP (since dpkg 1.17.21).
77It is currently the default behavior.
78.TP
79.BR \-\-no\-act
80Just test, do not actually change anything.
81.
82.SH EXIT STATUS
83.TP
84.B 0
85The requested action was successfully performed.
86Or a check or assertion command returned true.
87.TP
88.B 1
89A check or assertion command returned false.
90.TP
91.B 2
92Fatal or unrecoverable error due to invalid command-line usage, or
93interactions with the system, such as accesses to the database,
94memory allocations, etc.
95.
96.SH ENVIRONMENT
97.TP
98.B DPKG_ADMINDIR
99If set and the \fB\-\-admindir\fP option has not been specified, it will
100be used as the \fBdpkg\fP data directory.
101.
102.SH SEE ALSO
103.BR dpkg (1),
104.BR deb\-triggers (5),
105.\" FIXME: Unhardcode the pathname, and use dpkg instead of dpkg-dev.
106.BR /usr/share/doc/dpkg\-dev/triggers.txt.gz .