[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: postinst and debconf again



On Thu, Dec 19, 2002 at 02:58:11PM +0100, pp wrote:
> I posted my problem some time ago.

> postinst script:
> 
> #! /bin/sh -ex
> 
> . /usr/share/debconf/confmodule
> db_version 2.0
> db_title "Midgard library package."
> 
> if  $mysqlcmd -D mysql -e 'use midgard;' >/dev/null 2>&1 ; then
> 
>         db_input "high" midgard/error
>         db_go
>         db_stop
> else
> db_input high midgard/do_setup || true
> db_go


> Output:
> 
> + db_title 'Midgard library package.'
> + echo 'TITLE Midgard library package.'
> + local 'IFS=
> '
> + local _LINE
> + read -r _LINE
> + RET=0
> + return 0
> + /usr/bin/mysql --user= mysql -e 'select * from user;'
> + mysqlcmd=mysql
> + mysqladmcmd=mysqladmin
> + mysql -D mysql -e 'use midgard;'
> + db_input high midgard/error
> + echo 'INPUT high' midgard/error
> + local 'IFS=
> '
> + local _LINE
> + read -r _LINE
> + RET=question skipped
> + return 30
> dpkg: error processing libmidgard (--install):
>  subprocess post-installation script returned error exit status 30
> Errors were encountered while processing:
>  libmidgard

> debconf -s postinst
> runs without any problem 

You're missing a '|| true' after the prompt for midgard/error.  The
question is being skipped by debconf, probably because it's been shown
before, and this results in a different return code.

-- 
Steve Langasek
postmodern programmer

Attachment: pgpUyU3C7RZ9V.pgp
Description: PGP signature


Reply to: