[RFC] [kservice] KPluginMetadata indexing
Marco Martin
notmart at gmail.com
Thu Nov 6 15:23:16 UTC 2014
On Thursday 06 November 2014, Sebastian Kügler wrote:
> Basic Mechanism
>
> - a small tool called kplugin-update-index collects the json metadata from
> the plugins, and puts the list of plugins in a given plugin directory into
> a QJsonArray, and dumps that in Qt's json binary format to disk
since I'll end to use the mechanism for KPackage as well, it will be needed
also some api to access this, since we have there api for install() and
uninstall()
I'm also wondering, besides regenerating the whole cache, if would be some use
an incremental update as well that would just add a single plugin to the index
(may introduce new places in which the process may go wrong tough, such as not
searching for duplicates)
> These speedups do come at a cost, of course, and that is the added
> complexity of maintaining the caches. The idea from the bof sessions had
> been to update the caches at install time, this is essentially what can be
> done with kplugin- update-index (it needs some added logic to give the
> index files sensible permissions when run as root). That means that
> packagers will have to run the index updater in their postinstall routine.
> Not doing this at all means slower queries (or rather, no speedier
> queries), worse is if they forget to update once in a while, in which case
> newly installed or removed plugins might be missing or dangling in the
> index files. This will need at least some packaging discipline.
hmm, maybe the build process with some cmake magic could generate a script in
the build dir with the proper command so the process would be eased at least a
little?
> Index File Location
>
> The indexer creates the index files in the plugin directories itself, not
+1
--
Marco Martin
More information about the Kde-frameworks-devel
mailing list