On Mon, 2015 Feb 23 13:29+0100, Agustin Martin wrote: > > Hi, Daniel, > > This last lines show the reason for the problem you have. By the way, > things are working as expected. > > Pre-seeding is intended for first installation, when no elements > (wordlists, ispell dictionaries) are previously installed and apt- > utils is already installed (pre-seeding will not work with shared > questions otherwise). However, pre-seeding is not intended to work > once dictionaries are installed and a default value selected. This > default value will also be written to > "/var/cache/dictionaries-common/wordlist-default" (for wordlists) and > become the "true value". If it contains a valid value and different > from what debconf thinks, "true value" will win (I should have put it > under /etc, but changing it now does not worth) and debconf value will > be forcibly set to that "true value".
Okay, so the propagation is from wordlist-default to debconf, not the other way around. But isn't that inconsistent with this paragraph in the update-default-wordlist(8) man page?: When run normally (from the command line or with --trigger) this script rebuilds the info at /var/cache/dictionaries- common/wordlist.db after files under /var/lib/dictionaries- common/wordlist, reads the system default from the debconf database and unless disabled, set default symlinks in /etc/dictionaries- common pointing to the appropriate files in /usr/share/dict/. (There should probably be a mention of wordlist-default in there, and how it relates to debconf.) > If you already have some wordlists installed and want to install a new > one and make it the default value you use one of > > 1) Once new wordlist is installed, call `select-default-wordlist' as > root and select the new value. This does not appear to be scriptable, however. And isn't this the same as "dpkg-reconfigure dictionaries-common", going through debconf? > 2) Temporarily set a debconf priority threshold lower than high > (e.g. medium with DEBIAN_PRIORITY ENVAR, see debconf(7)) before > installing the new wordlist. This will trigger the debconf > question on instalation of the new wordlist. One of the first things I do is set the default debconf priority to low, so this is covered. I'm getting the question (my pre-seeding includes "seen false")---but the value I pre-seeded is not the one selected. > 3) Manually change "/var/cache/dictionaries-common/wordlist-default" > to the new value. Must be sure that the string is exactly one of > the valid strings, in the same encoding as the original master > string identifier. > > *This is discouraged*. Using `select-default-wordlist' is largely > preferred because 3) is more error prone. Incidentally, this is > the reason why I put the backup value under /var insted of under > /etc, so it is used internally in case of debconf database > corruption, but leaves 1) as the preferred method. This would be scriptable, but that error-prone-ness is why I was hoping for some leniency in what values are accepted. Could it be supported to do e.g. # echo english >/var/cache/dictionaries-common/wordlist-default # update-default-wordlist # cat /var/cache/dictionaries-common/wordlist-default english (Webster's Second International English wordlist) > > That's indeed what I'm doing; a master script runs debconf-set- > > selections first and then "apt-get install" as needed. > > The difference is that you already have some wordlists installed. Yes, I now see that the minimal install has wamerican already in place. > > Incidentally... is it supported to set a debconf value of just e.g. > > "english" or "american"---that is, minus the descriptive text in > > parentheses? I can't help but feel that only the first word should > > matter, but the debconf choice values including the parentheticals > > does imply otherwise. > > Sadly no, that string is used as full identifier. Note that wordlists > have different sizes or variants, so the full name is relevant. I was hoping it would be something like englishbar (English bar variant) englishfoo (English foo variant) rather than english (English bar variant) english (English foo variant) i.e. such that the initial word already uniquely identifies the dictionary. > Also, this schema was designed way before debconf supported > internationalized choices, with the parenthesized text supposed to > contain the text in dictionary pseudo-language. This was some sort of > poor's man internationalization, but at that time no better choice was > available. And that string is internally used as master identifier for > each wordlist, so changing it will trigger new debconf questions > unless a lot of migration code is written. So, changing it does not > worth the work. I'd be happy with the system accepting shorter values and "correcting" them to the longer canonical form, rather than simplifying the canonical forms themselves (though that would be very nice). > In short, I strongly suggest to use `select-default-wordlist'. But in a script? -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org