​​

Hello all

I have problem with creating deb package. As i known debian/config is
called before the deb is unpacked, however my debian/config is called
during debian/postinst.
Since debian/config supposed to be run twice -  my debian/postinst runs
with no param on second time, as a re sult - exit with error code 1.

Installation log:

> dpkg -i ../mfd-api_4.0-1_all.deb
> Selecting previously unselected package mfd-api.
> (Reading database ... 66805 files and directories currently installed.)
> Preparing to unpack ../mfd-api_4.0-1_all.deb ...
> mfd-api[87225]: I: Running mfd-api pre-installation. arguments install ...
> mfd-api[87226]: I: Running mfd-api pre-installation. arguments install ...
> done
> Unpacking mfd-api (4.0-1) ...
> Setting up mfd-api (4.0-1) ...
> mfd-api[87232]: I: Running mfd-api post-installation. arguments: configure
>  ...
> mfd-api[87233]: I: Applying mfd-api configuration...
> Use of uninitialized value $action in string eq at
> /usr/share/debconf/frontend line 27.
> mfd-api[87241]: D: Configuring MFD API: configure ... ### Heh???
> debian/config called with configure params
> mfd-api[87316]: D: Configuring MFD API: configure ... done
> mfd-api[87319]: I: Running mfd-api post-installation. arguments:  ...
> mfd-api[87320]: E: mfd-api post-installation called with unknown argument
> `' # somehow debian/postinst called with no params
> dpkg: error processing package mfd-api (--install):
>  subprocess installed post-installation script returned error exit status 1
> Processing triggers for ureadahead (0.100.0-16) ...
> Errors were encountered while processing:
>  mfd-api


>
Any ideas?

my postinst:

> #!/bin/sh
> set -e
> . /usr/share/mfd/mfd-utils
> apply_service_configuration(){
>         . /usr/share/debconf/confmodule
>         . /usr/share/mfd/api/debconf/apply-config # my
> apply-serice-configuration include file
>         main ### get debconf answers - just db_get's, and apply on service
> configuration files
>         db_stop
> }
>
> APP_NAME="mfd-api"
> LOG_TAG="$APP_NAME"
> log "I: Running $APP_NAME post-installation. arguments: $@ ..." # just
> echoes to stderr
> case "$1" in
>         configure)
>                 api_status=0
>                 log "I: Applying $APP_NAME configuration..."
>                 apply_service_configuration || api_status=$?
>                 if [ $api_status -ne 0 ]; then
>                         log "I: Applying $APP_NAME configuration... fail
> (exit code: $api_status)"
>                         exit $api_status
>                 fi
>                 log "I: Applying $APP_NAME configuration... done"
>         ;;
>         abort-upgrade|abort-remove|abort-deconfigure)
>         ;;
>         *)
>                 log "E: $APP_NAME post-installation called with unknown
> argument \`$1'"
>                 exit 1
>         ;;
> esac
> #DEBHELPER#
> log "I: Running $APP_NAME post-installation. arguments: $@ ... done"
> exit 0

Reply via email to