[Frugalware-devel] Akonadi database switch

Marius Cirsta mforce2 at gmail.com
Mon Apr 25 15:42:23 CEST 2011


On Sun, Apr 24, 2011 at 10:47 PM, bouleetbil <bouleetbil at frogdev.info> wrote:
> Le Sun, 24 Apr 2011 21:30:52 +0200,
> Miklos Vajna <vmiklos at frugalware.org> a écrit :
>
>> On Sun, Apr 24, 2011 at 09:53:40PM +0300, Marius Cirsta <mforce2 at gmail.com> wrote:
>> > Every time KDE 4 started I got a kres-migrator start which runs before
>> > Akonadi does. It turns out kres-migrator wasn't able to run because
>> > Akonadi no longer supports sqlite as a database. The default is now
>> > mysql and postgresql is an alternative ( doesn't seem that well
>> > maintained however ).
>> >
>> > Attached are two patches for adding dependencies needed because of
>> > this switch to mysql for both current and stable. Also for current
>> > there's a version bump to 1.5.2.
>>
>> Hi,
>>
>> Hmm, but this will break our "main vs extra" policy, since akonadi is
>> installed by default, while mysql is not.
>>

Sorry about that, didn't know about this, makes sense though.

>> Michel, isn't it possible to fix sqlite-default.patch?
>
> Hi,

Upon further investigation it turns out that sqlite is indeed
supported ( though this http://techbase.kde.org/Projects/PIM/Akonadi
said otherwise ). I added cmake option to set sqlite to default for
new installs and a post upgrade script to change all user configs to
sqlite if it's currently set to mysql. Mine was set to mysql with the
Akonadi packages in both stable and current. Here is the script :

post_upgrade()
{
  for user in `ls /home` ; do
      AKONADI_CONF=/home/$user/.config/akonadi/akonadiserverrc
      if [ -f "$AKONADI_CONF" ] ; then
	  CHK_MYSQL=`grep "Driver=QMYSQL" $AKONADI_CONF`
	  if [ -n "$CHK_MYSQL" ] ; then
	      echo "Switching Akonadi to use sqlite"
	      sed 's/Driver=QMYSQL/Driver=QSQLITE3/g' $AKONADI_CONF >
$AKONADI_CONF.temp
	      mv $AKONADI_CONF.temp $AKONADI_CONF
	      echo "changed $AKONADI_CONF to Driver=QSQLITE3"
	  fi
      fi
  done
}

Let me know if there are any issues with this.

Attached are the new patches for current and stable.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-rebuit-to-use-sqlite-by-default-current.patch
Type: application/octet-stream
Size: 4495 bytes
Desc: not available
URL: </pipermail/attachments/20110425/e711c21a/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-rebuit-to-use-sqlite-by-default-stable.patch
Type: application/octet-stream
Size: 4014 bytes
Desc: not available
URL: </pipermail/attachments/20110425/e711c21a/attachment-0001.obj>


More information about the Frugalware-devel mailing list