On Thu, Feb 19, 2015 at 03:00:12PM -0500, Daniel Richard G. wrote:
> On Thu, 2015 Feb 19 19:18+0100, Agustin Martin wrote:
> >
> > This seems another incarnation of "apt-utils must be installed before
> > any package trusting it is going to be installed" to properly process
> > config files at preconfigure stage.
> 
> I do have apt-utils in place prior to installing dictionaries-common. 

Strange, I could only reproduce this without apt-utils. In a chroot

# apt-get purge dictionaries-common wamerican apt-utils
# debconf-set-selections preseed-miscfiles
# export DICT_COMMON_DEBUG=1
# apt-get install miscfiles wamerican
Setting up wamerican (7.1-1) ...
 dict-common::dc_set: Warning: dictionaries-common/default-wordlist is already 
set to
      [english (Webster's Second International English wordlist)].
      Not setting to [american (American English)]
Setting up dictionaries-common (1.23.17) ...
[wordlist,dc_debconf_select]: Possible values, but unset
"dictionaries-common/default-wordlist". Trying harder to get a default value.
[wordlist,dc_debconf_select]: "dictionaries-common/default-wordlist" set to
"american (American English)". Can be changed with select-default-wordlist.
Setting up miscfiles (1.4.2.dfsg.1-9.1) ...

Question is reset because when wamerican postinst is processed debconf does not
yet know about miscfiles. I think I can make this more robust and have
better messages, but will need some time, most of that code was written some
time ago.

# apt-get install miscfiles wamerican apt-utils

shows the same problem.

On the contrary, when apt-utils is installed things work here as expected,

# apt-get purge dictionaries-common wamerican apt-utils
# debconf-set-selections preseed-miscfiles
# export DICT_COMMON_DEBUG=1
# apt-get install apt-utils
# apt-get install miscfiles wamerican
 dict-common::dc_set: Warning: dictionaries-common/default-wordlist is already 
set to
      [english (Webster's Second International English wordlist)].
      Not setting to [american (American English)]
 dict-common::dc_set: dictionaries-common/default-wordlist is set to [english 
(Webster's Second International English wordlist)]
...
Running trigger "update-default-wordlist"
Symlinking /usr/share/dict/words to /etc/dictionaries-common/words
update-default-wordlist: Default is set to "english (Webster's Second 
International English wordlist)" for "wordlist"
update-default-wordlist: "english (Webster's Second International English 
wordlist)" -> "web2"
update-default-wordlist: "/etc/dictionaries-common/words" symlink set to 
"/usr/share/dict/web2"

because all debconf stuff was parsed at the pre-configure stage.

> In fact, apt-utils is already part of a minimal Debian install :)

IMHO it should, but in special distributions it is sometimes installed
in the same dpkg run than other packages. Not a good thing.

> > Note that a depends will not work here, at the preconfigure stage it
> > will not yet be available. And when debconf stuff is processed from
> > postinst it will be done in a package by package basis, thus ignoring
> > preseeded value unless package providing it is processed the first.
> 
> I did set the preseed with debconf-set-selections well before installing
> dictionaries-common. (Is it really approved practice for package A to
> pre-seed debconf for package B?)

dictionaries-common should support this. Also, note that usually it is not
other package who does the preseed when used, but some sort of "master"
process during the installation.

Thanks for the feedback,

Regards,

-- 
Agustin
dictionaries-common dictionaries-common/default-wordlist select english 
(Webster's Second International English wordlist)

dictionaries-common dictionaries-common/default-wordlist seen false

Reply via email to