Chapter 6. Package maintainer scripts and installation procedure
42
3
1 If the package is being upgraded, call:
new preinst
upgrade
old version
new postrm
abort upgrade
old version
If that too fails, then
old postinst
abort upgrade
old version
is called.
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):
new preinst
install
old version
Error unwind:
new postrm
abort install
old version
3 Otherwise (i.e., the package was completely purged):
new preinst
install
Error unwind:
new postrm
abort install
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,
unless
Replaces
is used (see `Overwriting files and replacing packages
Replaces
' on
page
49
).
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
Replaces
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.
2
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
dpkg
will follow the symlink if
there is one.
5
1 If the package is being upgraded, call
2
Part of the problem is due to what is arguably a bug in
dpkg
.
footer
Our partners:
PHP: Hypertext Preprocessor Best Web Hosting
Java Web Hosting
Inexpensive Web Hosting
Jsp Web Hosting
Cheapest Web Hosting
Jsp Hosting
Cheap Hosting
Visionwebhosting.net Business web hosting division of Web
Design Plus. All rights reserved