mythtv-database won't cleanly upgrade during a dist-upgrade

Bug #68907 reported by Mario Limonciello
18
Affects Status Importance Assigned to Milestone
mythtv (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Currently when running through a dist-upgrade procedure, mythtv-database will cause the process to fail if the mysql-server is locally setup. Mythtv-database connects to this server to complete its post install configuration. Since mysql-server is stopped during the upgrade, it's not able to actually complete post install configuration.

There are several bugs opened that are caused by this issue: #67696, 41339, 58155, 68400. Any user that has mythtv-database installed in Dapper, and moves up to edgy will have a failed upgrade unless they remove mythtv-database prior to upgrade.

Revision history for this message
Mario Limonciello (superm1) wrote :

Attached is a patch that will clean up this problem. Instead of failing when not being able to connect to mysql-server, it will present the user with an update-notification bubble explaining what happened and what needs to be done after the upgrade (dpkg-reconfigure mythtv-database).

Revision history for this message
Mario Limonciello (superm1) wrote :

There was some previous discussion about what to do with this issue in bug 68400 with Michael Vogt.
"Hello Mario!

Thanks for looking into this issue. Unfortunately the update-manager
can't control the odering of unpack/configure in dpkg during the
install directly. This is all be done according to the dependencies of
the packages. The dependencies of the mytv-database are in such a way
that mysql server is unpacked (and therefore stopped) and it is
restarted only when it is configured again by dpkg (which happens after
mytv-database is configured).

So what happns is:

unpack mysql-server (stops the server)
unpack mythtv-database
configure mytv-database (tries to connect)
configure mysql-server (starts the server)

To fix the issue we either need to ensure that mytv-database is only
configured after mysql-server was configured. In theory a pre-depends
could be used for this, but because mytv-database does not depend on
mysql-server directly but only on the client this is not practical
(server might be on a different machine etc).

The other option is that the mytv-database postinst does not fail if it
can't connect to the database but echo a warning to run "dpkg-
reconfigure mythtv-database" (or even use a post-install notification or
a debconf note) and keeps going. Looking over the postinst script it
seems to be setting up a database (should be not needed on upgrades) and
converting from some older db format to a newer one. I don't know if
that is a issue during the upgrade. But if not I would only print out a
warning instead of letting the postinst fail when no database connection
is available.

Please let me know what you think!

Cheers,
Michael
"

Changed in mythtv:
status: Unconfirmed → Fix Committed
Kees Cook (kees)
Changed in mythtv:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.