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

debconf dependency problem.



Hi, I try to use a new data type 'multiselect' of debconf template.
But, I have a problem because the type is a new feature since 0.2.26.
At least, it would be needed to add a dependency of debconf
(>=0.2.26), but it can't still solve the problem so that as follows:
 
 * dpkg-preconfig is invoked before upgrading debconf.
 * apt solves the dependencies after dpkg-preconfig.

For example, apt-get install alsa-source that have a dependency
'Depends: debconf (>= 0.2.26).

tiger:/home/taru-net/masato# apt-get -s install alsa-source
Reading Package Lists... Done
Building Dependency Tree... Done
The following extra packages will be installed:
  debconf 
The following NEW packages will be installed:
  alsa-source 
1 packages upgraded, 1 newly installed, 0 to remove and 15 not upgraded.
Inst debconf
Inst alsa-source
Conf debconf
Conf alsa-source

dpkg-preconfig is invoked before 'Inst debconf'. So if the
installed version of debconf is less than 0.2.26, then dpkg-preconfig
of alsa-source is invoked with the old debconf and causes the error
so that alsa-source.config uses the new feature:

Unknown type of element at /usr/lib/perl5/Debian/DebConf/FrontEnd.pm line 108, <GEN5> chunk 5.
E: Sub-process dpkg-preconfig --apt returned an error code (2)
E: Failure running script dpkg-preconfig --apt

I think there are some solutions of this problem.

1. To change the db_version between the larger and less than 0.2.26
   and check the version in the config script( or a form to know
   what data type the debconf have).

but this means that we can't use the new feature in the config script
at first and must wait for the configuration for a long time until
the db_get in <package>.postinst is invoked. 

2. a form to upgrade only debconf at first before dpkg-preconfig.

This needs to improve apt as follows:

Inst debconf
Conf debconf
(Pre-configuration method)
Inst alsa-source
Conf alsa-source

or something like that, but this means that apt may become more complex.

3. it can't be helped. Whenever the error occurs, do apt-get install 
   debconf at first. (or a wrapper script of apt-get to check the 
   problem and separate apt-get install into two phases, or apt-get itself).

It may be better that debconf has a common template that is something like:

  * !!Version wrong!! Upgrade debconf at first.

and put

  if <1st solution's check function> ;then
    db_input critical debconf/wrong_debconf_version
    db_go
    exit 1
  fi

in every config scripts that the error may occurs or in db_version.

----
Masato Taruishi <taruis-m@jed.uec.ac.jp> | University of Electro Communications
                <taru@debian.or.jp>      |   Department of Computer Science
                <taru@sunicom.co.jp>     |              Senior
http://airs.net/~taru/                   |      Chofu city Tokyo, JAPAN  
   Key fingerprint = 49 46 74 E1 8D D1 EB 56  8D CA 2A 20 14 9E A9 25


Reply to: