1dpkg-divert(8)                  dpkg utilities                  dpkg-divert(8)
2
3
4

NAME

6       dpkg-divert - override a package's version of a file
7

SYNOPSIS

9       dpkg-divert [options] command
10

DESCRIPTION

12       dpkg-divert is the utility used to set up and update the list of diver‐
13       sions.
14
15       File diversions are a way of forcing dpkg(1) not to install a file into
16       its  location,  but  to  a  diverted  location.  Diversions can be used
17       through the Debian package scripts to move a file away when it causes a
18       conflict.  System administrators can also use it to override some pack‐
19       age's configuration file, or whenever some files (which  aren't  marked
20       as  'conffiles')  need to be preserved by dpkg, when installing a newer
21       version of a package which contains those files.
22
23

COMMANDS

25       [--add] file
26              Add a diversion for file.
27
28       --remove file
29              Remove a diversion for file.
30
31       --list glob-pattern
32              List diversions matching glob-pattern.
33
34       --listpackage file
35              Print the name of the package that diverts file.   Prints  LOCAL
36              if file is locally diverted and nothing if file is not diverted.
37
38       --truename file
39              Print the real name for a diverted file.
40

OPTIONS

42       --admindir directory
43              Set   the   dpkg   data   directory   to   directory   (default:
44              /var/lib/dpkg).
45
46       --divert divert-to
47              divert-to is the location where the versions of  file,  as  pro‐
48              vided by other packages, will be diverted.
49
50       --local
51              Specifies that all packages' versions of this file are diverted.
52              This means, that there are no exceptions, and  whatever  package
53              is installed, the file is diverted. This can be used by an admin
54              to install a locally modified version.
55
56       --package package
57              package is the name of a package whose copy of file will not  be
58              diverted.  i.e.  file  will  be diverted for all packages except
59              package.
60
61       --quiet
62              Quiet mode, i.e. no verbose output.
63
64       --rename
65              Actually move the file aside (or back). dpkg-divert  will  abort
66              operation in case the destination file already exists.
67
68       --test Test  mode, i.e. don't actually perform any changes, just demon‐
69              strate.
70
71       --help Show the usage message and exit.
72
73       --version
74              Show the version and exit.
75

NOTES

77       When adding, default is --local and --divert  <original>.distrib.  When
78       removing, --package or --local and --divert must match if specified.
79
80       Directories can't be diverted with dpkg-divert.
81
82       Care  should be taken when diverting shared libraries, ldconfig(8) cre‐
83       ates a symbolic link based on  the  DT_SONAME  field  embedded  in  the
84       library.  Because ldconfig doesn't honour diverts (only dpkg does), the
85       symlink may end up pointing at the  diverted  library,  if  a  diverted
86       library has the same SONAME as the undiverted one.
87

EXAMPLES

89       To  divert  all  copies  of a /usr/bin/example to /usr/bin/example.foo,
90       i.e. directs all packages providing /usr/bin/example to install  it  as
91       /usr/bin/example.foo, performing the rename if required:
92
93       dpkg-divert --divert /usr/bin/example.foo --rename /usr/bin/example
94
95       To remove that diversion:
96
97       dpkg-divert --rename --remove /usr/bin/example
98
99
100       To   divert   any   package   trying  to  install  /usr/bin/example  to
101       /usr/bin/example.foo, except your own wibble package:
102
103       dpkg-divert --package  wibble  --divert  /usr/bin/example.foo  --rename
104              /usr/bin/example
105
106       To remove that diversion:
107
108       dpkg-divert --package wibble --rename --remove /usr/bin/example
109

FILES

111       /var/lib/dpkg/diversions
112              File  which  contains the current list of diversions of the sys‐
113              tem. It is located in the dpkg administration  directory,  along
114              with other files important to dpkg, such as status or available.
115              Note:  dpkg-divert  preserves  the  old  copy of this file, with
116              extension -old, before replacing it with the new one.
117

SEE ALSO

119       dpkg(1).
120

AUTHOR

122       Copyright © 1995 Ian Jackson
123
124       This is free software; see the GNU General Public Licence version 2  or
125       later for copying conditions. There is NO WARRANTY.
126
127
128
129Debian Project                    2008-08-18                    dpkg-divert(8)
Impressum