Chapter 3. Binary packages
16
that other packages are de installed. (In this case, it may be appropriate to specify a conflict
against earlier versions of something that previously did not use
update alternatives
;
this is an exception to the usual rule that versioned conflicts should be avoided.)
3.10.1 Prompting in maintainer scripts
Package maintainer scripts may prompt the user if necessary. Prompting should be done by
communicating through a program, such as
debconf
, which conforms to the Debian Config 
uration management specification, version 2 or higher. Prompting the user by other means,
such as by hand
3
, is now deprecated.
The
Debian
Configuration
management
specification
is
included
in
the
debconf_specification
files in the
debian policy
package. It is also available from
the Debian web mirrors at
/doc/packaging manuals/debconf_specification.html
(
http://www.debian.org/doc/packaging manuals/debconf_specification.
html
)
.
Packages which use the Debian Configuration management specification may contain an addi 
tional
config
script and a
templates
file in their control archive
4
. The
config
script might
be run before the
preinst
script, and before the package is unpacked or any of its dependen 
cies or pre dependencies are satisfied. Therefore it must work using only the tools present in
essential packages.
5
Packages should try to minimize the amount of prompting they need to do, and they should
ensure that the user will only ever be asked each question once. This means that packages
should try to use appropriate shared configuration files (such as
/etc/papersize
and
/etc
/news/server
), and shared
debconf
variables rather than each prompting for their own list
of required pieces of information.
It also means that an upgrade should not ask the same questions again, unless the user has
used
dpkg   purge
to remove the package's configuration. The answers to configuration
questions should be stored in an appropriate place in
/etc
so that the user can modify them,
and how this has been done should be documented.
If a package has a vitally important piece of information to pass to the user (such as  don't
run me as I am, you must edit the following configuration files first or you risk your system
emitting badly formatted messages ), it should display this in the
config
or
postinst
script
and prompt the user to hit return to acknowledge the message. Copyright messages do not
count as vitally important (they belong in
/usr/share/doc/
package
/copyright
); neither
do instructions on how to use a program (these should be in on line documentation, where all
the users can see them).
Any necessary prompting should almost always be confined to the
config
or
postinst
script. If it is done in the
postinst
, it should be protected with a conditional so that unnec 
3
From the Jargon file: by hand 2. By extension, writing code which does something in an explicit or low level
way for which a presupplied library (debconf, in this instance) routine ought to have been available.
4
The control.tar.gz inside the .deb. See
deb(5)
.
5
Debconf
or another tool that implements the Debian Configuration management specification will also be
installed, and any versioned dependencies on it will be satisfied before preconfiguration begins.






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

gay web hosting

 

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