On Wed, Nov 27, 2013 at 12:38:38AM -0400, Joey Hess wrote: > Bas Wijnen wrote: > > > (Citation needed.) > > > > http://codesearch.debian.net/search?q=db_get+path%3A.*config%24 > > If the presence of db_get in a config script was always a bug, then I > [cw]oud modify debconf to not allow db_get in config scripts.
Obviously it is not. I first wrote some explanation with it, but since you didn't seem to take any trouble at all (there are two examples in the bug log, for example), I decided to just point you at a list of config files[1]. From what I've seen about half of them does not ever use db_set, which means they must be buggy. [1] I incorrectly assumed that all config files had to use db_get to do anything useful. I should probably have used db_go, or db_input. > But, it's not. Randomly reviewing only packages I have already installed > from the first 3 pages of results, I found no uses of db_get that didn't > appear to make sense, and none that caused overwriting of values from > system config files. It's not about overwriting. The point is that debconf will use its own cache for defaults, which means that running dpkg-reconfigure and then pressing enter on all but the thing you're interested in changing should not make any changes on those items, but does in fact reset them back to whatever the answer was that debconf last saw. AFAICS, debconf shouldn't actually have a cache at all. Whenever it is used, the value from the config file should be used instead. Perhaps there are some cases that there is no config file, but I would argue that in those cases there should be one (otherwise debconf is used as a registry). > This is fairly typical: > > # debconf is not a registry; use the current contents of the default display > # manager file to pre-answer the question if possible Yes, I noticed those as well. Judging from the comment, they used to be broken but have been fixed. All display managers seem to have this same code in them. If a bug is found in it, we can only hope it is fixed in all of them. On Wed, Nov 27, 2013 at 12:43:54AM -0400, Joey Hess wrote: > If someone would really like to improve the state of debconf use in > config scripts, I think that the best approach would be to find a way > to replace the current imperative config scripts with a declarative > format. I like that idea, but (unless you allow code in a declaration, which would defeat the purpose) my intuition says that it isn't powerful enough to handle all the special cases that packages need. Or am I misunderstanding you? Thanks, Bas
signature.asc
Description: Digital signature