Linux Commands Examples

A great documentation place for Linux commands

dpkg-trigger

a package trigger utility


see also : dpkg

Synopsis

dpkg-trigger [option...] trigger-name
dpkg-trigger
[option...] command


add an example, a script, a trick and tips

: email address (won't be displayed)
: name

Step 2

Thanks for this example ! - It will be moderated and published shortly.

Feel free to post other examples
Oops ! There is a tiny cockup. A damn 404 cockup. Please contact the loosy team who maintains and develops this wonderful site by clicking in the mighty feedback button on the side of the page. Say what happened. Thanks!

examples

0
source
            
&& test x"$DPKG_MAINTSCRIPT_PACKAGE" != x \
&& dpkg-trigger --check-supported 2>/dev/null \
&& dpkg --compare-versions "$DPKG_RUNNING_VERSION" ge '1.14.5ubuntu10~~'
&& dpkg --compare-versions "$DPKG_RUNNING_VERSION" ge '1.14.5ubuntu10~~'
then
if dpkg-trigger --no-await ldconfig; then

description

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

This can be used by maintainer scripts in complex and conditional situations where the file triggers, or the declarative 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 dpkg-trigger).

Unrecognized trigger name syntaxes are an error for dpkg-trigger.

options

--admindir=dir

Change the location of the dpkg database. The default location is /var/lib/dpkg.

--by-package=package

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

--no-await

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

--no-act

Just test, do not actually change anything.

commands

--check-supported

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

-?, --help

Show the usage message and exit.

--version

Show the version and exit.

environment

DPKG_ADMINDIR

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


see also

dpkg , deb-triggers, /usr/share/doc/dpkg-dev/triggers.txt.gz.

How can this site be more helpful to YOU ?


give  feedback