Since 4.6.0 we've been seeing maildir resources with broken configs. When these are migrated to 4.7, kmail2 refuses to start with "Failed to fetch the resource collection" because the SpecialCollections provided by local maildir resources are not present. On viewing the resource in akonadiconsole from 4.6.0 to current master, the resource state is still Ready - this should be Broken.
If MaildirResource::ensureSaneConfiguration() is called in the ctor, we notice the problem early. This would allow kmail-migrator to correct the problem or warn the user. diff --git a/resources/maildir/maildirresource.cpp b/resources/maildir/maildirresource.cpp index 7536aa8..89ff635 100644 --- a/resources/maildir/maildirresource.cpp +++ b/resources/maildir/maildirresource.cpp @@ -112,6 +112,7 @@ MaildirResource::MaildirResource( const QString &id ) scope.setAncestorRetrieval( ItemFetchScope::None ); setItemSynchronizationFetchScope( scope ); + ensureSaneConfiguration(); connect( m_fsWatcher, SIGNAL(dirty(QString)), SLOT(slotDirChanged(QString)) ); synchronizeCollectionTree(); l
Git commit e62bc48f1bfeb212337474b2cc6ea8689af383a4 by Andras Mantia. Committed on 11/02/2012 at 12:36. Pushed by amantia into branch 'master'. Check configuration at startup. Patch from Will. FIXED-IN: 4.8.1 M +2 -0 resources/maildir/maildirresource.cpp http://commits.kde.org/kdepim-runtime/e62bc48f1bfeb212337474b2cc6ea8689af383a4
Git commit 35aa0172063541d72993cd30df630de6d2fb664a by Andras Mantia. Committed on 11/02/2012 at 12:36. Pushed by amantia into branch 'KDE/4.8'. Check configuration at startup. Patch from Will. FIXED-IN: 4.8.1 (cherry picked from commit e62bc48f1bfeb212337474b2cc6ea8689af383a4) M +2 -0 resources/maildir/maildirresource.cpp http://commits.kde.org/kdepim-runtime/35aa0172063541d72993cd30df630de6d2fb664a
Git commit d4f0f74a5139325c7a78bbd07c8c91f6d9f02f29 by Andras Mantia. Committed on 11/02/2012 at 13:12. Pushed by amantia into branch 'master'. Improvement of the previous commit, so a newly created resource doesn't remain in Broken state. M +10 -4 resources/maildir/maildirresource.cpp M +1 -1 resources/maildir/maildirresource.h http://commits.kde.org/kdepim-runtime/d4f0f74a5139325c7a78bbd07c8c91f6d9f02f29
Git commit 66587d91216dd8b24edc58fe350a3be76dc3adda by Andras Mantia. Committed on 11/02/2012 at 13:12. Pushed by amantia into branch 'KDE/4.8'. Improvement of the previous commit, so a newly created resource doesn't remain in Broken state. (cherry picked from commit d4f0f74a5139325c7a78bbd07c8c91f6d9f02f29) M +10 -4 resources/maildir/maildirresource.cpp M +1 -1 resources/maildir/maildirresource.h http://commits.kde.org/kdepim-runtime/66587d91216dd8b24edc58fe350a3be76dc3adda
Think this bug is not 100% fixed in 4.8.1. You can generate it by trying to add a new maildir. Kmail will post a message that the resource is broken. If you type in a full mairdir path, for a new maildir directory, it will let you proceed.