[mythtv-users] Debian update problem
Nick Morrott
knowledgejunkie at gmail.com
Sat Oct 28 00:36:53 UTC 2017
On 27 October 2017 at 18:12, Mike Perkins <mikep at randomtraveller.org.uk> wrote:
> I'm doing a simple "apt-get update" on all my systems before the clocks go
> forward tomorrow. tzdata is one of those files which gets updated round
> about now.
>
> Doing my backend server, which is on stretch, I got a "held back" message
> for 'python-mythtv' and I recalled some discussion here recently.
>
> OK, so I did a "dist-upgrade" and it pulled in a whole load of new mythtv
> components. Along the way it asked me for a mythtv database user and
> password. It had filled in "root" with the warning "do not change this" and
> there was no password, so I just hit return.
>
> No dice. The upgrade errored out:
...
> Setting up mythtv-database (0.28.1+fixes20170926.git172459d737-dmo1+deb9u2)
> ...
> Failed to connect to database: Access denied for user 'root'@'192.168.151.8'
> (using password: NO) at -e line 5, <> line 1.
> Failed to connect to database: Access denied for user 'root'@'192.168.151.8'
> (using password: NO) at -e line 5, <> line 1.
> dpkg: error processing package mythtv-database (--configure):
> subprocess installed post-installation script returned error exit status
> 255
...
> root at jade:/home/micheal# dpkg-reconfigure mythtv-database
> /usr/sbin/dpkg-reconfigure: mythtv-database is broken or not fully installed
...
> root at jade:/home/micheal# apt-get --reinstall install mythtv-database
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> The following package was automatically installed and is no longer required:
> libarchive13
> Use 'apt autoremove' to remove it.
> 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not
> upgraded.
> 1 not fully installed or removed.
> After this operation, 0 B of additional disk space will be used.
> E: Internal Error, No file name for mythtv-database:amd64
...
> There's obviously a post-upgrade install script somewhere that keeps getting
> tripped but I've no idea how to find it. For that matter, I'm not sure what
> is actually wrong. Was I supposed to put my mythtv user and password in
> there or what? It certainly isn't clear.
Debian pre/post install/removal scripts live in /var/lib/dpkg/info/$package.*
The mythtv-database.postinst script is wanting to use the database's
admin user's credentials to check/setup the mythconverg database. This
is before granting privileges to the mythtv user for regular MythTV
connections to the DB.
The failure location looks (to my tired, addled brain) to be because
the admin password was empty. You could try either:
i) giving the SQL DB root user a password, and then retrying the
configuration once the mythtv-database package is playing ball, or
ii) editing the postinst script DBI->connect entry in DoSQL() and
changing the \$password field to '' (the empty string) and see if that
allows installation to continue.
You can see what your installation currently has configured for these
settings with:
# debconf-show mythtv-database
Handy steps for reconfiguring partially installed packages can be found in:
https://askubuntu.com/questions/103834/how-do-i-force-configuration-of-partially-installed-packages
You probably want to
# apt-get -f install
in the first instance to try and get your current package status as
clean as possible.
Hope this helps,
Nick
More information about the mythtv-users
mailing list