[Kde-pim] Newbie questions about Akonadi/KDEPIM codebase
Andras Mantia
amantia at kde.org
Thu Dec 6 17:27:49 GMT 2012
Hi,
sorry for the late reply, I tend to forget old mails if I don't reply
immeditately. Feel free to "ping" us again if you get not reply in
reasonable time (3-5 days).
Yury G. Kudryashov wrote:
> Andras Mantia wrote:
>
>> Hi,
>> Yury G. Kudryashov wrote:
>>
>>> Q2. How should parts of KDE-PIM (resource, server, kmail) operate while
>>> creating a folder? Which signals are sent/slots are called?
>>
>> I hope this explains what you want, for more exact details look up the
>> code itself.
> Thanks a lot for your help!
>
> This part goes OK, including creating a folder on the server and receiving
> "OK" from the server.
>
> I've found two strange facts about the newly created collection:
> 1. The only mimetype is inode/directory. Who is responsible for setting
> the mimetypes?
For collections it is inode/directory indeed. In general the resource is
responsible to set the correct mimetype, if it needs a custom one. See
Akonadi::Item for details.
> 2. The remote identifier is "itest-folder" instead of ".test-folder". I
> found nothing about "itest" in the logs. Any ideas?
What kind of logs and which resource? The resource is free to chose a remote
indetifier, the only reason for it is to map somehow the akonadi item to the
"remote" item. I'm not sure where the "i" comes from in your case, but
knowing the resource involved might give me a clue.
> Don't know if the following excerpt from akonadictl stderr helps.
>> akonadi_imap_resource_3(30007)/kdepimlibs (kimap)
>> AddCollectionTask::doStart: New folder: "test-folder"
>> akonadi_imap_resource_3(30007)/libakonadi
Ah, IMAP.
>> Akonadi::CollectionSync::Private::execute: void
>> Akonadi::CollectionSync::Private::execute() localListDone: false
>> deliveryDone: true
>> akonadi_imap_resource_3(30007)/libakonadi
>> Akonadi::CollectionSync::Private::execute: void
>> Akonadi::CollectionSync::Private::execute() localListDone: true
>> deliveryDone: true
>> Error during executing query "INSERT INTO CollectionTable (remoteId,
>> remoteRevision, name, parentId, resourceId, cachePolicyInherit) VALUES
>> (:0, :1, :2, :3, :4, :5)" : "Duplicate entry '1073-test-folder' for key
>> 'CollectionTable_parentAndNameIndex' QMYSQL3: Unable to execute
>> statement" akonadi_imap_resource_3(30007)/kdepimlibs (kimap)
>> RetrieveCollectionMetadataTask::doStart: ".test-folder"
Hm this looks like a problem, seems like there is some conflict in the
database. RemoteId's should be unique for collections having the same
parent, and I guess that constrait is violated in your case. How you reached
this situation I don't know. Check the CollectionTable in akonadiconsole
what is the real name for the collection having "test-folder" as remote id.
The remoteId in IMAP case is set in kdepim-
runtime/resources/imap/addcollectiontask.cpp
void AddCollectionTask::doStart( KIMAP::Session *session )
You can debug there what is going on. To debug, the best is to attach the
debugger on-the-fly to the akonadi_imap_resource process.
I hope this gives you a start.
Andras
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/
More information about the kde-pim
mailing list