control: tags -1 confirmed control: clone -1 -2 control: retitle -2 dbtype reconfig takes over old answers iso defaults control: retitle -1 dbc's config state machine is not idem-potent
On Fri, 09 Mar 2012 17:20:11 +0000 Shaun Lipscombe <deb...@gasops.co.uk> wrote: > Subject: drupal6: I select postgres as the dbtype during the debconf > option form. I then abort and run through it again. This time I > select mysql. This time it fails as it's still using the username > postgres to connect to mysql. I think I understand what happens. And it probably requires quite some logic to properly fix this. (I thought we already had a bug about poor database switching, but the closest I got was bug 700833) In step 3 of the config state machine we assign the default value for the administrator (dbtype dependent) but only if the dbc_dbadmin variable doesn't exist yet. [code] # if these haven't been specified, use defaults if [ ! "$dbc_dbadmin" ]; then dbc_dbadmin="$dbc_default_admin"; fi if [ ! "$dbc_dbuser" ]; then dbc_dbuser="$dbc_default_dbuser" fi [/code] Of course the problem is that this way, the state machine is broken, as backing up the debconf questions will NOT reset the behavior of this block of code, so it is wrong. The semi good news is that since 1.8.50 (IIRC) the error handling will make sure that you actually get the question on what the admin user name is, so it is relatively easy to correct. Also normal reconfigure will ask the question, then just the default answer is wrong. Paul
signature.asc
Description: OpenPGP digital signature