fix sycoca init to pass in isolated testbeds without pre-existing sycoca
AbandonedPublic

Authored by sitter on May 10 2016, 8:48 AM.

Details

Reviewers
dfaure
Summary

ksyscoca internally only registers dirwatch listening if it can read the
cache file. without a pre-existing file that wouldn't ever be the cache
though and as such the databaseChanged is never emitted because the watcher
never sends a created signal on changes because we never registered for
the signal. it also appears there is no way to rest this once we have an
instance.
to bypass this simply check that ksycoca::self will yield a fully working
cache monitor or don't use it at all and watch the file manually.

Diff Detail

Repository
R126 KDE CLI Utilities
Branch
Plasma/5.6
Lint
No Linters Available
Unit
No Unit Test Coverage
sitter updated this revision to Diff 3745.May 10 2016, 8:48 AM
sitter retitled this revision from to fix sycoca init to pass in isolated testbeds without pre-existing sycoca.
sitter updated this object.
sitter edited the test plan for this revision. (Show Details)
sitter added a reviewer: dfaure.
sitter added a subscriber: plasma-devel.
dfaure edited edge metadata.May 13 2016, 9:15 AM

I'm seeing similar failures in the kservice framework, so I think we should rather fix kservice to emit databaseChanged upon first creation too.

I honestly did not understand why the relevant function in kservice doesn't kdirwatch the path regardless of whether it exists. It seems like an incredibly silly thing to not do that, so I was thinking it was intentional :/

That said, I think simply removing the conditional in kservice might be sorting this already, I have no time to test that theory though.

Haha, don't assume my code is stupid on purpose, it can also be stupid by oversight :-)

I pushed a fix for kservice, can you check if it fixes your issue?
http://commits.kde.org/kservice/f82de1626f8efdb56ca810fc827d40bf7eed4601

Right. kservicetest was still failing too, but after adding debug output it now passes every time....

I committed the additional debug output in kdirwatch and enabled kdirwatch debug output in filetypestest. Can you kick a build again and let me know the result? (doesn't seem to happen automatically on build.neon.kde.org)

Neon presently only integrates source changes once a day. You should be able to poke rebuilds yourself btw as login is driven through phabricator

http://build.neon.kde.org/job/xenial_unstable_frameworks_kservice/
http://build.neon.kde.org/job/xenial_unstable_plasma_kde-cli-tools/

Here's a build with the debug output
http://build.neon.kde.org/job/xenial_unstable_plasma_kde-cli-tools_adt/5/console

dfaure requested changes to this revision.May 22 2016, 12:56 PM
dfaure edited edge metadata.

Fixed in kservice, CI is green, you can discard this patch.

Thanks for the analysis of the issue, it really helped!

This revision now requires changes to proceed.May 22 2016, 12:56 PM
sitter abandoned this revision.May 22 2016, 6:23 PM

Thanks! :)