[DRE-maint] Bug#695774: redmine: fails to upgrade, says something about a pgsql_adapter

Thorsten Glaser t.glaser at tarent.de
Thu Jan 17 09:02:01 UTC 2013


Dixi quod…

> Maybe I should purge dbconfig* too… and remove all entries
> related to that from debconf…

Oh. Now I can’t even purge redmine any more:

[…] Deconfigure database for redmine/instances/default with dbconfig-common?
⇒ Yes

dpkg: error processing redmine (--purge):                                                                   
 subprocess installed pre-removal script returned error exit status 10
dpkg-query: no packages found matching redmine-

 +----------------------------------------+ Configuring redmine +----------------------------------------+  
 |                                                                                                       |  
 | redmine- package required                                                                             |  
[…] same thing

Skipping default because of missing dependency.                                                             
dpkg: redmine-pgsql: dependency problems, but removing anyway as you requested:
 redmine depends on redmine-sqlite | redmine-mysql | redmine-pgsql; however:
  Package redmine-sqlite is not installed.
  Package redmine-mysql is not installed.
  Package redmine-pgsql is to be removed.

Removing redmine-pgsql ...
dpkg: dbconfig-common: dependency problems, but removing anyway as you requested:
 redmine depends on dbconfig-common; however:
  Package dbconfig-common is to be removed.

Removing dbconfig-common ...
Purging configuration files for dbconfig-common ...
dpkg: warning: while removing dbconfig-common, directory '/etc/dbconfig-common' not empty so not removed
Processing triggers for man-db ...
Errors were encountered while processing:
 redmine
E: Sub-process /usr/bin/dpkg returned an error code (1)


I got around it by changing set -e to set +e in
/var/lib/dpkg/info/redmine.prerm (absolute hack,
but I had to purge it), with the expected errors
following:

/var/lib/dpkg/info/redmine.prerm[39]: .: /usr/share/dbconfig-common/dpkg/prerm: No such file or directory
Purging configuration files for redmine ...
rmdir: failed to remove /var/lib/redmine/*/files': No such file or directory
rmdir: failed to remove /var/lib/redmine/*': No such file or directory

Now trying to reinstall (there was no dbconfig* or redmine*
in the debconf cache any more, I checked)…

root at redmine:~ # apt-get install redmine redmine-pgsql
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  dbconfig-common
Suggested packages:
  ruby-rmagick ruby-openid bzr cvs darcs mercurial
The following NEW packages will be installed:
  dbconfig-common redmine redmine-pgsql
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 540 kB/5577 kB of archives.
After this operation, 13.4 MB of additional disk space will be used.
Do you want to continue [Y/n]?
Get:1 http://mirror.lan.tarent.de/debian/ wheezy/main dbconfig-common all 1.8.47+nmu1 [487 kB]
Get:2 http://mirror.lan.tarent.de/debian/ wheezy/main redmine-pgsql all 1.4.4+dfsg1-1.1 [52.9 kB]
Fetched 540 kB in 0s (6646 kB/s)
Preconfiguring packages ...
debconf: warning: possible database corruption. Will attempt to repair by adding back missing question dbconfig-common/password-confirm.
debconf: warning: possible database corruption. Will attempt to repair by adding back missing question redmine/instances/default/password-confirm.
debconf: warning: possible database corruption. Will attempt to repair by adding back missing question dbconfig-common/app-password-confirm.
debconf: warning: possible database corruption. Will attempt to repair by adding back missing question redmine/instances/default/app-password-confirm.
debconf: warning: possible database corruption. Will attempt to repair by adding back missing question redmine/instances/default/mysql/app-pass.
debconf: warning: possible database corruption. Will attempt to repair by adding back missing question dbconfig-common/mysql/app-pass.
debconf: warning: possible database corruption. Will attempt to repair by adding back missing question dbconfig-common/mysql/admin-pass.
debconf: warning: possible database corruption. Will attempt to repair by adding back missing question redmine/instances/default/mysql/admin-pass.
debconf: warning: possible database corruption. Will attempt to repair by adding back missing question redmine/instances/default/pgsql/app-pass.
debconf: warning: possible database corruption. Will attempt to repair by adding back missing question dbconfig-common/pgsql/app-pass.
debconf: warning: possible database corruption. Will attempt to repair by adding back missing question dbconfig-common/pgsql/admin-pass.
debconf: warning: possible database corruption. Will attempt to repair by adding back missing question redmine/instances/default/pgsql/admin-pass.
Selecting previously unselected package dbconfig-common.
(Reading database ... 45632 files and directories currently installed.)
Unpacking dbconfig-common (from .../dbconfig-common_1.8.47+nmu1_all.deb) ...
Selecting previously unselected package redmine-pgsql.
Unpacking redmine-pgsql (from .../redmine-pgsql_1.4.4+dfsg1-1.1_all.deb) ...
Selecting previously unselected package redmine.
Unpacking redmine (from .../redmine_1.4.4+dfsg1-1.1_all.deb) ...
Processing triggers for man-db ...
Setting up dbconfig-common (1.8.47+nmu1) ...

Creating config file /etc/dbconfig-common/config with new version
Setting up redmine-pgsql (1.4.4+dfsg1-1.1) ...
Setting up redmine (1.4.4+dfsg1-1.1) ...

Now I get to the config for the database. Seems as though not
everything was purged, even though I have no idea where else
debconf had stored its information, in /var/cache/debconf/
there was nothing about it any more… this smells like another
Beckmann bug in dbconfig-common…

Ahahahahaha…

I choose Yes to Configure database for redmine/instances/default
with dbconfig-common?, then pgsql and left the password blank:

dbconfig-common: writing config to /etc/dbconfig-common/redmine/instances/default.conf                      

Creating config file /etc/dbconfig-common/redmine/instances/default.conf with new version

Creating config file /etc/redmine/default/database.yml.new with new version
creating postgres user redmine:  success.
verifying creation of user: success.
creating database redmine_default: success.
verifying database redmine_default exists: success.
dbconfig-common: flushing administrative password

Creating config file /etc/redmine/default/database.yml with new version
NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01.
Gem.source_index called from /usr/share/redmine/vendor/rails/railties/lib/rails/gem_dependency.rb:21.

Creating config file /etc/redmine/default/session.yml with new version
A new secret session key has been generated in /etc/redmine/default/session.yml
Populating database for redmine instance "default".
This may take a while.
NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01.
Gem.source_index called from /usr/share/redmine/vendor/rails/railties/lib/rails/gem_dependency.rb:21.
rake aborted!
Please install the pgsql adapter: `gem install activerecord-pgsql-adapter` (cannot load such file -- active_record/connection_adapters/pgsql_adapter)

Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
Error when running rake db:migrate, check database configuration.
dpkg: error processing redmine (--configure):
 subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
 redmine
E: Sub-process /usr/bin/dpkg returned an error code (1)


So, even after a full purge of redmine, redmine-pgsql and
dbconfig-common, the error persists. (WTF‽)

bye,
//mirabilos
-- 
tarent solutions GmbH
Rochusstraße 2-4, D-53123 Bonn • http://www.tarent.de/
Tel: +49 228 54881-393 • Fax: +49 228 54881-314
HRB 5168 (AG Bonn) • USt-ID (VAT): DE122264941
Geschäftsführer: Boris Esser, Sebastian Mancke




More information about the Pkg-ruby-extras-maintainers mailing list