[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    GHNS & plasmapkg
From:       Petri =?iso-8859-1?q?Damst=E9n?= <petri.damsten () gmail ! com>
Date:       2008-10-28 16:50:21
Message-ID: 200810281850.27805.petri.damsten () gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/signed)]

[Attachment #4 (multipart/mixed)]


Hi,

I'm testing GHNS for comics and have some problems. knsrc has:
InstallationCommand=plasmapkg -t comic -i %f

GHNS loaded plasma packages should be installed with plasmapkg (like in 
kdebase/workspace/libs/plasma/scripting/plasmoids.knsrc)? If yes then:

- Uninstall only removes the downloaded package file (Because that's the only 
file installed by GHNS) and there is no UninstallCommand in GHNS. Is it too 
late to add UninstallCommand to GHNS or would there a better solution?
- Update runs Install again but plasmapkg won't install over existing package 
(or uninstall + install). 

If we get package file name from GHNS can we remove package with that 
information? Install takes package filename and uninstall takes package name 
which we might not know for custom packages if I understood correctly.

Run kbuildsyscoca4 from plasmapkg patch attached.

Petri



["plasmapkg.diff" (text/x-patch)]

Index: main.cpp
===================================================================
--- main.cpp	(revision 876826)
+++ main.cpp	(working copy)
@@ -30,6 +30,7 @@
 #include <KServiceTypeTrader>
 #include <KShell>
 #include <KStandardDirs>
+#include <KProcess>
 
 #include <plasma/packagestructure.h>
 
@@ -41,6 +42,16 @@
     std::cout << msg.toLocal8Bit().constData() << std::endl;
 }
 
+void runKbuildsycoca()
+{
+    QString bin = KStandardDirs::findExe("kbuildsycoca4");
+    if (!bin.isEmpty()) {
+        KProcess process;
+        process.setProgram(bin);
+        process.execute();
+    }
+}
+
 void listPackages()
 {
     //TODO: implement
@@ -147,6 +158,7 @@
 
             if (installer->installPackage(package, packageRoot)) {
                 QString msg = i18n("Successfully installed %1", package);
+                runKbuildsycoca();
             } else {
                 output(i18n("Installation of %1 failed.", package));
                 return 1;
@@ -155,6 +167,7 @@
             QString package = args->getOption("remove");
             if (installer->uninstallPackage(package, packageRoot)) {
                 output(i18n("Successfully removed %1", package));
+                runKbuildsycoca();
             } else {
                 output(i18n("Removal of %1 failed.", package));
                 return 1;

["signature.asc" (application/pgp-signature)]

_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic