I have just submitted a patch which implement automatic scanning of the source code of Plasma-related packages (e.g. widgets) for required data engines.
For packages in scripting languages and distributed through Open Collaboration Services (OCS), this is fully automatic and triggered from
Package::installPackage. If an
X-Plasma-RequiredDataEngines entry is present in the .desktop file (even if empty), the dependency extraction is not run and the explicitly provided information is trusted instead.
For native distribution packages, my patch adds a tool called
plasma-dataengine-depextractor which can be run at any time during the build process and which adds the dependency information (the
X-Plasma-RequiredDataEngines entry) to the relevant
Authors of plasmoids are encouraged to run
plasma-dataengine-depextractor and/or fill in
X-Plasma-RequiredDataEngines manually. (Please note that the list is expected to be comma-separated.)
Of course, the automatic scanning is not perfect; in particular, it will not detect convoluted ways to load data engines (e.g. if the name is a variable), and it may have false positives in some corner cases (commented-out use of a data engine, some other function called
dataEngine and taking a string literal). However, I expect it to work well in practice, and if it doesn’t work, there’s always the possibility to explicitly add the
This is the final portion of my GSoC 2011 project, so the project can now be considered 100% complete.