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
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
Description: This is a digitally signed message part.
_______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel