Re: Pre-Depends of #CDD#-common meta packages from cdd-common
Steve Langasek <firstname.lastname@example.org> wrote:
> On Fri, Jun 11, 2004 at 12:59:04PM +0200, Andreas Tille wrote:
>> This was the old solution which is suboptimal because asking questions
>> in postinst script sucks. The question can only be asked when cdd-common
>> is installed because they call scripts from this package to aquire data
>> which are needed for the questions.
> The .config script is executed twice during an apt-based package
> installation: once during pre-configure, and once when the postinst
> If you write your .config script carefully, you can make it run
> correctly in the absence of the packages you need, but use them if
> they're present. This maximizes the number of people who will be able
> to take advantage of pre-config for your package.
In this particular case, wouldn't it be possible to defer any
questioning in config if the needed commands are not available?
if command $NEEDED_COMMAND >/dev/null 2>&1; then
# wait until we are called again from postinst,
# then the command will be available
(besides that I don't know whether "command" is a bashism)
Frank Küster, Biozentrum der Univ. Basel
Abt. Biophysikalische Chemie