[mythtv-users] Debian update fails mythtv-database (re)configure

Nick Morrott knowledgejunkie at gmail.com
Sun Jul 5 02:42:24 UTC 2015


On 5 July 2015 at 01:28, Robin Gilks <g8ecj at gilks.org> wrote:
> I'm running Debian 8.1 Jessie and get mythtv from here
>
> deb http://mirror.optus.net/deb-multimedia jessie main non-free
>
> When running 'apper' the other day I noticed something hadn't fully
> installed. I ran the following to see what what the error was in detail.
>
>
> # apt-get -f install
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
> 2 not fully installed or removed.
> After this operation, 0 B of additional disk space will be used.
> Setting up mythtv-database (0.27.5-dmo2) ...
> Failed to execute SQL: CREATE DATABASE mythconverg\nAccess denied for user
> 'root'@'woden.localdomain' to database 'mythconverg' at -e line 8, <> line
> 1.
> Failed to connect to database: Access denied for user
> 'root'@'woden.localdomain' (using password: YES) at -e line 5, <> line 1.
> dpkg: error processing package mythtv-database (--configure):
>  subprocess installed post-installation script returned error exit status 255
> dpkg: dependency problems prevent configuration of mythtv:
>  mythtv depends on mythtv-database (>= 0.27.5-dmo2); however:
>   Package mythtv-database is not configured yet.
>
> dpkg: error processing package mythtv (--configure):
>  dependency problems - leaving unconfigured
> Errors were encountered while processing:
>  mythtv-database
>  mythtv
> E: Sub-process /usr/bin/dpkg returned an error code (1)
>
> Several questions arise:
>   1. why is the update trying to create mythconverg when it already exists

The check the postinst script uses to try to connect to the existing
mythconverg database has failed.

>   2. why is it using the root user rather than information from config.xml

The db_get calls the postinst script uses to get the admin
username/password/hostname has likely returned the incorrect data for
successful connection to your DB.

>   3. why is it even trying to mess with the database when its down to
> mythtv-setup to do the updates not some random install script

mythtv-setup will *update* an existing database, but the initial
database must be created manually. Because the above checks have
determined there is no database present (erroneously, in your case),
it tries to create a new one.

> Everything is still working OK but of course I get the same error every
> time I update or install something.

The postinst script for the mythtv-database package should be in
/var/lib/dpkg/info/mythtv-database.postinst.

You could look through the script and try to see where it is failing
by running the db_get calls in configure() and comparing the results
to the entries stored in your config.xml file.

Nick

-- 
Nick Morrott

MythTV Official wiki: http://mythtv.org/wiki/
MythTV users list archive: http://www.gossamer-threads.com/lists/mythtv/users

"An investment in knowledge always pays the best interest." - Benjamin Franklin


More information about the mythtv-users mailing list