[mythtv-commits] Ticket #13256: mythtv-setup Xubuntu 18.04

MythTV noreply at mythtv.org
Mon Oct 29 04:39:52 UTC 2018

#13256: mythtv-setup Xubuntu 18.04
 Reporter:  mike.bibbings@…       |          Owner:  (none)
     Type:  Bug Report - General  |         Status:  new
 Priority:  minor                 |      Milestone:  needs_triage
Component:  Packaging             |        Version:  v29-fixes
 Severity:  low                   |     Resolution:
 Keywords:                        |  Ticket locked:  0

Comment (by trinitronx):

 Ok, I added a patch file for the changes mentioned by baizej earlier.  It
 also appears that perhaps XML schema has changed for the file:

 This might be another Bug already, but there is a mysql connection error
 returned when starting {{{mythtv-setup}}}:

 mysql: [Warning] Using a password on the command line interface can be
 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using
 password: NO)

 This comes from the very first part of {{{mythtv-setup.sh}}}:

 #source our dialog functions
 . /usr/share/mythtv/dialog_functions.sh

 #get database info
 getXmlParam() {
   perl -e '
     use XML::Simple;
     use Data::Dumper;
     $xml = new XML::Simple;
     $data = $xml->XMLin("/etc/mythtv/config.xml");
     print "$data->{Database}->{$ARGV[0]}\n";
   ' -- "$1"
 DBHost="$(getXmlParam Host)"
 DBUserName="$(getXmlParam UserName)"
 DBPassword="$(getXmlParam Password)"
 DBName="$(getXmlParam DatabaseName)"

 #get mythfilldatabase arguments
 mbargs=$(mysql -N \
  --host="$DBHost" \
  --user="$DBUserName" \
  --password="$DBPassword" \
  "$DBName" \
  --execute="SELECT data FROM settings WHERE value =
 'MythFillDatabaseArgs';" \

 It tries to read XML database parameters using this inline perl command
 from: /etc/mythtv/config.xml

 However, the XML Schema of this file looks like this:

 Set the <LocalHostName> hostname override below only if you want to use
 something other than the machine's real hostname for identifying settings
 in the database.  This is useful if your hostname changes often, as
 otherwise you'll need to reconfigure mythtv every time.



 So, the perl code is looking on this XML object in the wrong place! It
 looks under {{{$data->{Database}-> __DB_STUFF_HERE}}}

 My guess is that in newer versions of MythTV, this file XML schema
 changed, but it used to be something probably like:


 The {{{getXmlParam}}} function would have to be modified to check the XML
 object and look for it in both places conditionally (e.g.: under

Ticket URL: <https://code.mythtv.org/trac/ticket/13256#comment:7>
MythTV <http://www.mythtv.org>
MythTV Media Center

More information about the mythtv-commits mailing list