← Back to team overview

mythbuntu-bugs team mailing list archive

[Bug 1062525] Re: 0.26 upgrade failed "no database selected"

 

As an added note, I responded to the thread in question with

I'm completely unable to reproduce the issue using a fresh 12.04.1
install (upgraded using default repos), enabling 0.26 repo, then doing
an upgrade there. So it would seem to me that it is not a packaging
issue. The code you are questioning is as follows


CONFIG=/etc/mythtv/config.xml
if [ -e $CONFIG ]; then
    db_set mythtv/mysql_mythtv_dbname "`xpath  -q -e
'string(//DBName)' $CONFIG 2>/dev/null`"
    db_set mythtv/mysql_mythtv_user "`xpath  -q -e
'string(//DBUserName)' $CONFIG 2>/dev/null`"
    db_set mythtv/mysql_mythtv_password "`xpath  -q -e
'string(//DBPassword)' $CONFIG 2>/dev/null`"
    db_set mythtv/mysql_host "`xpath  -q -e 'string(//DBHostName)'
$CONFIG 2>/dev/null`"
fi


Which says to read the /etc/mythtv/config.xml file and set the value
to what is returned (and throw away error messages). So if you run the
following commands and don't get returns of your DBName, DBUserName,
DBPassword, and DBHostName, then there is something wrong with your
config.xml file.

xpath  -q -e 'string(//DBName)' /etc/mythtv/config.xml 2>/dev/null
xpath  -q -e 'string(//DBUserName)' /etc/mythtv/config.xml 2>/dev/null
xpath  -q -e 'string(//DBPassword)' /etc/mythtv/config.xml 2>/dev/null
xpath  -q -e 'string(//DBHostName)' /etc/mythtv/config.xml 2>/dev/null


For instance, on this VM I just setup, I get

thomas@tmashos-testboxen5:~$ xpath  -q -e 'string(//DBName)'
/etc/mythtv/config.xml 2>/dev/null
mythconverg
thomas@tmashos-testboxen5:~$ xpath  -q -e 'string(//DBUserName)'
/etc/mythtv/config.xml 2>/dev/null
mythtv
thomas@tmashos-testboxen5:~$ xpath  -q -e 'string(//DBPassword)'
/etc/mythtv/config.xml 2>/dev/null
Nal0pMRh
thomas@tmashos-testboxen5:~$ xpath  -q -e 'string(//DBHostName)'
/etc/mythtv/config.xml 2>/dev/null
localhost
thomas@tmashos-testboxen5:~$

-- 
You received this bug notification because you are a member of Mythbuntu
Bug Team, which is subscribed to Mythbuntu.
https://bugs.launchpad.net/bugs/1062525

Title:
  0.26 upgrade failed "no database selected"

Status in Mythbuntu, Ubuntu derivative focused upon MythTV:
  Invalid

Bug description:
  Please see the archives of the mythtv-users list at:
  http://www.mythtv.org/pipermail/mythtv-users/2012-October/340743.html

  Martin Moores reported the upgrade to .26 failed.
  $ sudo apt-get dist-upgrade
  ...
  encountered while processing:
   mythtv-database
   mythtv
  E: Sub-process /usr/bin/dpkg returned an error code (1)

  
  Steven Adeff noted the following:
  it's a packaging issue with Ubuntu. you have to manually edit the
  post-install script for the mythdatabase package with your specific
  information. I put it in manually as I didn't want to take the time to
  figure out how they're "extracting" the info. It's really quite
  annoying.

To manage notifications about this bug go to:
https://bugs.launchpad.net/mythbuntu/+bug/1062525/+subscriptions


References