Here comes the patch. Works fine for me. What do you think? Does this resolve the problem?
diff -rc dbconfig-common-1.8.41/debian/changelog 
dbconfig-common-1.8.42/debian/changelog
*** dbconfig-common-1.8.41/debian/changelog     2009-03-15 07:46:17.000000000 
-0300
--- dbconfig-common-1.8.42/debian/changelog     2009-05-19 14:11:58.000000000 
-0300
***************
*** 1,3 ****
--- 1,9 ----
+ dbconfig-common (1.8.42) unstable; urgency=low
+ 
+   * closes: #529365 (user cannot re-install database after remove)
+ 
+  -- Florian Grandel <jerico....@gmail.com>  Tue, 19 May 2009 14:10:50 -0300
+ 
  dbconfig-common (1.8.41) unstable; urgency=low
  
    * Fix for a location in the code where ucf was not being called with the
diff -rc dbconfig-common-1.8.41/dpkg/config dbconfig-common-1.8.42/dpkg/config
*** dbconfig-common-1.8.41/dpkg/config  2009-02-17 19:05:34.000000000 -0300
--- dbconfig-common-1.8.42/dpkg/config  2009-05-19 16:25:36.000000000 -0300
***************
*** 38,43 ****
--- 38,50 ----
        dbc_read_package_config
        dbc_preseed_package_debconf
  
+       # Find out whether the database has been purged on a previous occasion. 
If
+       # so, we'll have to give the user a chance to re-install it.
+       db_get $dbc_package/purge
+       if [ "$RET" = true ]; then
+               dbc_command=reconfigure
+       fi
+ 
      # check out if they're migrating from a non-dbc version
      if [ "$dbc_oldversion" ] && [ "$dbc_first_version" ] && \
          dpkg --compare-versions "$dbc_first_version" gt "$dbc_oldversion"; 
then
diff -rc dbconfig-common-1.8.41/dpkg/postinst 
dbconfig-common-1.8.42/dpkg/postinst
*** dbconfig-common-1.8.41/dpkg/postinst        2009-02-17 19:05:34.000000000 
-0300
--- dbconfig-common-1.8.42/dpkg/postinst        2009-05-19 17:23:47.000000000 
-0300
***************
*** 139,144 ****
--- 139,149 ----
                                [ "$dbc_tried_again" ] && return 0
                                dbc_logline "done"
                        fi
+ 
+                       # now that we are sure that the database has been
+                       # (re-)installed, we can reset the purge flag.
+                       db_set $dbc_package/purge false
+                       db_fset $dbc_package/purge seen false
                fi      
  
                # end install/reconfigure section

Reply via email to