Chapter 6. Package maintainer scripts and installation procedure
1 If the package is being upgraded, call:
If that too fails, then
2 Otherwise, if the package had some configuration files from a previous version in
stalled (i.e., it is in the configuration files only state):
3 Otherwise (i.e., the package was completely purged):
4 The new package's files are unpacked, overwriting any that may be on the system al
ready, for example any from the old version of the same package or from another pack
age. Backups of the old files are kept temporarily, and if anything goes wrong the pack
age management system will attempt to put them back as part of the error unwind.
It is an error for a package to contain files which are on the system in another package,
is used (see `Overwriting files and replacing packages
It is a more serious error for a package to contain a plain file or other kind of non directory
where another package has a directory (again, unless
is used). This error can
be overridden if desired using
force overwrite dir
, but this is not advisable.
Packages which overwrite each other's files produce behavior which, though determin
istic, is hard for the system administrator to understand. It can easily lead to missing
programs if, for example, a package is installed which overwrites a file from another
package, and is then removed again.
A directory will never be replaced by a symbolic link to a directory or vice versa; instead,
the existing state (symlink or not) will be left alone and
will follow the symlink if
there is one.
1 If the package is being upgraded, call
Part of the problem is due to what is arguably a bug in