Created attachment 300547 [details] xbmc.log xbmc-9999-nomythtv.patch for media-tv/xbmc-9999 causes XBMC to fail while opening sqlite3 databases (see attachment). Additionaly, CPU usage is higher than usual due to infinite database open retries. I'm not sure if this is caused by latest patch update (v 1.2) or if it was like that since 1.1. If xbmc is compiled without this patch, everything works fine. Also xbmc compiled directly from upstream sources works OK. I've also tried earlier xbmc versions (commits around mid-January I think) with the patch but got the same error.
Shouldn't the xbmc-9999-nomythtv patch be conditional on use pvr?
no. the patch adds a proper configure flag which is then used with econf.
72 +if test "$use_mythtv" = "yes"; then 73 + AC_CHECK_PROG(MYSQL_CONFIG, mysql_config, "yes", "no") 74 + if test $MYSQL_CONFIG = "yes"; then 75 + INCLUDES="$INCLUDES `mysql_config --include`" 76 + MYSQL_LIBS=`mysql_config --libs` 77 + LIBS="$LIBS $MYSQL_LIBS" 78 + AC_SUBST(MYSQL_LIBS) 79 + else 80 + AC_MSG_ERROR($missing_program) 81 + fi 82 + AC_CHECK_LIB([mysqlclient], [main], 83 + AC_DEFINE([BUILD_MYTHTV], [1], [Define to 1 to build mythtv.]), 84 + AC_MSG_ERROR($mysql_not_found)) 85 else 86 - AC_MSG_ERROR($missing_program) 87 + AC_MSG_RESULT($mythtv_disabled) 88 fi one of the problems is in the patch line 72 which makes links to mysql libs only if u use teh pvr option which causes all sorts of porblems espeically if you use mysql db as you video db. i removed that whole part from xbmc-9999 ebuild and back to normal
so it's only a problem for people who chose to use mysql as their backend db rather than sqlite independent of mythtv. probably need to tweak the patch like upstream suggested.
(In reply to comment #4) > so it's only a problem for people who chose to use mysql as their backend db > rather than sqlite independent of mythtv All of my tests were done with "-pvr". For me it appears that the patch alone causes the problem. Removing it from .ebuild makes thing work again.
I have the same problem as vpiotr. I use sqlite db and with new ebuild I get errors when xbmc tries to open db.
By default the database type is empty and the fallback is made in Open(...). The problem is that the patch disables that fallback entirely in the current trunk: #ifdef BUILD_MYTHTV if ( dbSettings.type.Equals("mysql") ) { // check we have all information before we cancel the fallback if ( ! (dbSettings.host.IsEmpty() || dbSettings.user.IsEmpty() || dbSettings.pass.IsEmpty()) ) m_sqlite = false; else CLog::Log(LOGINFO, "Essential mysql database information is missing. Require at least host, user and pass defined."); } else { dbSettings.type = "sqlite3"; dbSettings.host = _P(g_settings.GetDatabaseFolder()); dbSettings.name = GetBaseDBName(); } #endif /* BUILD_MYTHTV */ which should be something like this instead: #ifdef BUILD_MYTHTV if ( dbSettings.type.Equals("mysql") ) { // check we have all information before we cancel the fallback if ( ! (dbSettings.host.IsEmpty() || dbSettings.user.IsEmpty() || dbSettings.pass.IsEmpty()) ) m_sqlite = false; else CLog::Log(LOGINFO, "Essential mysql database information is missing. Require at least host, user and pass defined."); } else #else /* always fallback to sqlite3 */ { dbSettings.type = "sqlite3"; dbSettings.host = _P(g_settings.GetDatabaseFolder()); dbSettings.name = GetBaseDBName(); } #endif /* BUILD_MYTHTV */
Created attachment 300841 [details, diff] xbmc-9999-nomythtv-v2.patch Applying the fix in comment #7 works for me. Here's a new version of the patch.
i've merged your patch with the existing one, and split the mysql/mythtv logic http://sources.gentoo.org/media-tv/xbmc/xbmc-9999.ebuild?r1=1.98&r2=1.99 http://sources.gentoo.org/media-tv/xbmc/files/xbmc-9999-nomythtv.patch?r1=1.2&r2=1.3