On 03/22/2011 16:15, Raphael Kubo da Costa wrote:
Jan Henrik Sylvester<m...@janh.de> writes:
On 03/22/2011 15:23, Raphael Kubo da Costa wrote:
This commit in Amarok's master:
http://quickgit.kde.org/?p=amarok.git&a=commitdiff&h=c62bb9a2ba514165e8e430302aafb19bfb95b9ce
My idea is to make sure your patch also works with the upcoming
versions, otherwise we will have trouble in the next release again.
And in case the patch makes sense, it'd be good to have it upstream
instead of keeping it in ports, so that's one more reason to make sure
it works with master.
I am not sure, if upstream will take that patch, as it is only necessary
for mysql 5.5 installations that are not patched. AFAIR, Fedora for
example has the mysql bug patched. The patch should not cause
regressions with configurations that do not have the mysql bug, though.
Anyway, I can confirm that the patch is still needed after applying the
git change you mentioned to amarok 2.4.0. Of course, it needs to be
modified to apply.
The first of the two files attached patches that file in amarok to the
git master version, the second file is the workaround for the mysql bug.
If you put both in audio/amarok-kde4/files/, the current official
FreeBSD port (2.4.0) works again with the current mysql port (5.5.10).
The overall effect is exactly the same is with my earlier patch.
When the amarok port is updated, the first patch does not apply anymore
and can be deleted, but the second one should remain, as long as mysql
does not fix the bug and amarok does not incorporate the/a workaround.
Cheers,
Jan Henrik
---
src/core-impl/collections/db/sql/mysqlecollection/MySqlEmbeddedStorage.cpp.orig
2011-01-11 16:58:06.000000000 +0100
+++ src/core-impl/collections/db/sql/mysqlecollection/MySqlEmbeddedStorage.cpp
2011-03-22 16:21:09.000000000 +0100
@@ -82,7 +82,8 @@
}
setenv( "MYSQL_HOME", storagePath.toAscii().data(), 1 );
- if( mysql_server_init( 0 , 0, 0 ) != 0 )
+ char *args[] = { "amarok" };
+ if( mysql_library_init( 1 , args, 0 ) != 0 )
{
error() << "MySQL library initialization failed.";
reportError( "init" );
---
src/core-impl/collections/db/sql/mysqlecollection/MySqlEmbeddedStorage.cpp.orig
2011-03-22 16:21:09.000000000 +0100
+++ src/core-impl/collections/db/sql/mysqlecollection/MySqlEmbeddedStorage.cpp
2011-03-22 16:52:16.000000000 +0100
@@ -82,8 +82,16 @@
}
setenv( "MYSQL_HOME", storagePath.toAscii().data(), 1 );
- char *args[] = { "amarok" };
- if( mysql_library_init( 1 , args, 0 ) != 0 )
+ QString defaultsFileOption = "--defaults-file=";
+ defaultsFileOption += defaultsFile;
+ QByteArray defaultsFileOptionAscii = defaultsFileOption.toAscii();
+ QString databaseDirOption = "--datadir=";
+ databaseDirOption += databaseDir;
+ QByteArray databaseDirOptionAscii = databaseDirOption.toAscii();
+ char *args[] = { "amarok", 0, 0 };
+ args[1] = defaultsFileOptionAscii.data();
+ args[2] = databaseDirOptionAscii.data();
+ if( mysql_library_init( sizeof(args)/sizeof(char *) , args, 0 ) != 0 )
{
error() << "MySQL library initialization failed.";
reportError( "init" );
_______________________________________________
kde-freebsd mailing list
kde-freebsd@kde.org
https://mail.kde.org/mailman/listinfo/kde-freebsd
See also http://freebsd.kde.org/ for latest information