[packagekit] [PATCH] Add support for Plasma service lookup (resend)

Kevin Kofler kevin.kofler at chello.at
Sun Jun 19 21:21:24 PDT 2011


Hi,

(I am resending this with the patches compressed because the mailing list 
software apparently got very confused by the git-generated mail headers 
inside the attached patches. Sorry for that.)

as I explained in my previous mail to this list:
http://lists.freedesktop.org/archives/packagekit/2011-June/006336.html
I am working on PackageKit integration for KDE's Plasma.

The attached patches implement the required PackageKit support, both in the 
core and in the frontends. I have tested that those patches compile. I 
haven't done any runtime testing yet because I have to write the Plasma-side 
code first to test this properly.

* packagekit-plasma.patch is the patch for PackageKit itself. It adds a new 
enum member called PK_PROVIDES_ENUM_PLASMA_SERVICE and implements it in the 
yum and zif backends by looking up the RPM Provides generated by this 
script:
https://kevinkofler.wordpress.com/2011/06/05/automatic-plasma-rpm-provides/
https://fedorahosted.org/kde-settings/browser/branches/gsoc-2011-plasma-rpm
All the frontend patches depend on this patch.

* apper-plasma.patch and kpackagekit06-plasma.patch are for Apper (formerly 
known as KPackageKit), respectively for the master and KPACKAGEKIT_0.6.X 
branches. I did the backport for 0.6.x because master has been ported to the 
new PackageKit-Qt 2 binding, so the backport isn't a straightforward merge, 
and the new Apper code from master isn't released yet.

* gnome-packagekit-plasma.patch is for gnome-packagekit. I am least sure 
about this one:
- Do we want this feature in gnome-packagekit at all? (It will help people 
who want to run gnome-packagekit in a KDE Plasma session, or people running 
plasmoidviewer in a GNOME session, or similar corner cases.)
- I'm not as familiar with GTK+ code as with Qt code (though I do have some 
limited GTK+ coding experience), so I'm less confident I did everything 
right. (As I said, I haven't tested these patches beyond "it compiles" yet.)
- The patch doesn't currently do the prettifying of the strings I did in the 
Apper patches, i.e. changing dataengine-%1 to "%1 data engine", where the 
"%1 data engine" string can be translated (and likewise for scriptengine). 
This is because of the 2 points above (I don't want to spend too much time 
on a patch if I'm not sure that it will be used, so I didn't want to mess 
around with the GLib string API more than needed), and also because I'm not 
sure such prettifying is worth it at all for this corner usecase. But I can 
fix that if requested.
- Another suboptimal thing in the patch is that gnome-packagekit supports 
"More info" URLs, and my patch just uses the "DEFAULT" URL class. It might 
make sense to add an additional one for Plasma. Here too, I can add this 
stuff if it is deemed worthwhile.

        Kevin Kofler
-------------- next part --------------
A non-text attachment was scrubbed...
Name: apper-plasma.patch.bz2
Type: application/x-bzip
Size: 3918 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/packagekit/attachments/20110620/091bfe70/attachment-0016.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gnome-packagekit-plasma.patch.bz2
Type: application/x-bzip
Size: 3910 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/packagekit/attachments/20110620/091bfe70/attachment-0017.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kpackagekit06-plasma.patch.bz2
Type: application/x-bzip
Size: 3738 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/packagekit/attachments/20110620/091bfe70/attachment-0018.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: packagekit-plasma.patch.bz2
Type: application/x-bzip
Size: 1597 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/packagekit/attachments/20110620/091bfe70/attachment-0019.bin>


More information about the PackageKit mailing list