Plasmoids, DataEngines & GHNS

Aaron J. Seigo aseigo at kde.org
Wed Dec 22 23:46:42 CET 2010


On Wednesday, December 22, 2010, Thomas Olsen wrote:
> that checks whether X-KDE-PluginInfo-Depends (or somewhere else) contains
> a link to an installable DataEngine and then ask the user if she also
> wants to install that?

yes, i think that would make sense. it would be nice if this was possible to 
do in the GHNS GUI (for consistency). in any case, what's needed to make this 
happen (and is something i'd really like to see), is for 
Plasma::Package::installPackage(..) to check the metadata.desktop file for 
such dependencies and then offer to download them.

this would make that process all a bit more complex, and one of the main 
problems there is that it is a synchronous call. since asking the user, 
downloading, etc. are all async, that would mean hanging the application in 
Plasma::Package::installPackage.

this was an oversight in the original API design. 
PackageStructure::installPackage really should return a KJob* and be async. it 
should also be able to override the behaviour in PackageStructure. i've noted 
this on the libplasma2 planning page on community.kde.org.

so we would need to pick between:

* holding off on libplasma2 before doing this

* hack it into Plasma::PackageStructure now by making installPackage a 
synchronous wrapper around a new method in Plasma::PackageStructure, perhaps 
called Plasma::PackageStructure::install(..). this new method would Q_INVOKE a 
protected Q_SLOT that would return a KJob * (this could be done internal to 
Plasma::Package) with notes made about fixing this in libplasma2

* automatically download dependencies without asking the user

i don't think the third option is something we can do. i personally favor the 
second option. it's not pretty, but it would let us create this functionality 
now rather than later.

the actual mechanics of querying GHNS for package availability would require 
some work as well as it doesn't seem to be set up for random querying outside 
of the GHNS UI right now. that should be fixable though :)

so if we do go the route of the second option above, then there are several 
steps towards making this happen:

* adding the KJob* returning method to PackageStructure 

* put the contents of the static Package::installPackage method into a new 
private method that returns a KJob* (the existing Package::installPackge would 
just wrap this new method)

* add code to check for dependencies in the metadata.desktop after the archive 
is unpacked, but before it is installed

* figure out a plan for GHNS (probably with fregl)

interested in working on any of those things? :)

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Qt Development Frameworks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20101222/db7bc702/attachment.sig 


More information about the Plasma-devel mailing list