Subject: [Pkg-cacti-maint] Bug#665742: dpkg-reconfigure: Table 'cdef' already exists

From: Jack Bates <[email-masked]>
Date: Sun, 25 Mar 2012 08:35:23 -0700

Package: cacti
Version: 0.8.7g-1+squeeze1
Severity: minor

When I run "dpkg-reconfigure cacti" it asks me: "Reinstall database for cacti?"
but although I answer "Yes", it complains:

> An error occurred while installing the database:
>
> mysql said: ERROR 1050 (42S01) at line 5: Table 'cdef' already exists

 ... unless I first: "mysqladmin drop cacti"

-- System Information:
Debian Release: 6.0.4
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-5-686 (SMP w/2 CPU cores)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages cacti depends on:
ii  apache2-mpm-prefork [h 2.2.16-6+squeeze6 Apache HTTP Server - traditional n
ii  dbconfig-common        1.8.46+squeeze.0  common framework for packaging dat
ii  debconf [debconf-2.0]  1.5.36.1          Debian configuration management sy
ii  libapache2-mod-php5    5.3.3-7+squeeze8  server-side, HTML-embedded scripti
ii  libphp-adodb           5.10-1            The ADOdb database abstraction lay
ii  mysql-client-5.1 [virt 5.1.61-0+squeeze1 MySQL database client binaries
ii  php5-cli               5.3.3-7+squeeze8  command-line interpreter for the p
ii  php5-mysql             5.3.3-7+squeeze8  MySQL module for php5
ii  php5-snmp              5.3.3-7+squeeze8  SNMP module for php5
ii  rrdtool                1.4.3-1           time-series data storage and displ
ii  snmp                   5.4.3~dfsg-2      SNMP (Simple Network Management Pr
ii  ucf                    3.0025+nmu1       Update Configuration File: preserv

Versions of packages cacti recommends:
ii  iputils-ping           3:20100418-3      Tools to test the reachability of 
ii  logrotate              3.7.8-6           Log rotation utility
ii  mysql-server           5.1.61-0+squeeze1 MySQL database server (metapackage
ii  mysql-server-5.1 [mysq 5.1.61-0+squeeze1 MySQL database server binaries and

Versions of packages cacti suggests:
pn  php5-ldap                     <none>     (no description available)

-- debconf information:
  cacti/db/app-user: cacti
  cacti/mysql/admin-user: root
  cacti/upgrade-backup: true
  cacti/install-error: abort
* cacti/webserver: Apache
  cacti/internal/reconfiguring: false
  cacti/mysql/method: unix socket
  cacti/remote/host:
  cacti/upgrade-error: abort
  cacti/dbconfig-upgrade: true
  cacti/internal/skip-preseed: false
  cacti/remote/newhost:
  cacti/purge: false
  cacti/passwords-do-not-match:
  cacti/dbconfig-remove:
* cacti/dbconfig-install: true
  cacti/missing-db-package-error: abort
  cacti/database-type: mysql
  cacti/remove-error: abort
  cacti/db/dbname: cacti
  cacti/remote/port:
  cacti/dbconfig-reinstall: false

---

From: Paul Gevers <[email-masked]>
Date: Sun, 29 Apr 2012 13:33:11 +0200

reassign 665742 dbconfig-common
retitle 665742 drop database when requested by dpkg-reconfigure answer
thanks

As dbconfig-common asks the question if the database should be
reinstalled, it should make sure to drop any existing related database
if the answer is "Yes". If not, recreating tables that already exist

---

From: [email-masked] (Debian Bug Tracking System)
Date: Sun, 29 Apr 2012 11:45:28 +0000

> reassign 665742 dbconfig-common
Bug #665742 [cacti] dpkg-reconfigure: Table 'cdef' already exists
Bug reassigned from package 'cacti' to 'dbconfig-common'.
No longer marked as found in versions cacti/0.8.7g-1+squeeze1.
Ignoring request to alter fixed versions of bug #665742 to the same values previously set
> retitle 665742 drop database when requested by dpkg-reconfigure answer
Bug #665742 [dbconfig-common] dpkg-reconfigure: Table 'cdef' already exists
Changed Bug title to 'drop database when requested by dpkg-reconfigure answer' from 'dpkg-reconfigure: Table 'cdef' already exists'
> thanks
Stopping processing here.

Please contact me if you need assistance.
-- 
665742: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=665742
Debian Bug Tracking System
Contact [email-masked] with problems