I’m having a strange issue with kpackagetool6
where it will install a KWin script (and the KWin script works) but then the same tool fails to remove/uninstall that very same KWin script from the same folder, with an error like this:
kf.package: Could not find required file "mainscript" for package "/home/cjbottaro/.local/share/kwin/scripts/" should be QList("code/main.js")
kf.package: Could not find required file "mainscript" for package "/usr/share/kwin/scripts/" should be QList("code/main.js")
Error: Plugin is not installed.
The KWin script in question is here in this development branch of my fork of a repo:
There’s an install script and an uninstall script, they just automate issuing the kpackagetool
command appropriate for the KDE version on the system. Ultimately it will just issue a command like this:
kpackagetool6 --type=KWin/Script --install .
The error is coming directly from kpackagetool6
, since it appears when I run the tool manually without using the uninstall script.
The KWin script itself is compatible with both Plasma 5 and 6 and this has been tested in multiple virtual machines with different distros using Plasma 5 and 6. The metadata.json
file was updated with the line needed to make it Plasma 6 compatible:
"KPackageStructure": "KWin/Script",
But another user trying to install the same KWin script keeps getting this kind of error, which I haven’t run into myself in testing multiple distros:
KPackageStructure of KPluginMetaData(pluginId:"applicationswitcher", fileName: "/home/cjbottaro/.local/share/kwin/scripts/applicationswitcher/metadata.json") does not match requested format "KWin/Script"
I’d appreciate any insight someone can shed on whether any of this is actually caused by a bug or bugs of some kind in kpackagetool6
, or some kind of remaining incompatibility in the KWin script or its metadata file. Searching for parts of the error message brought up nothing relevant online, or even here in this forum.
Why would the tool have an error when uninstalling the KWin script, but not have that same error when installing it, from the same folder, if it’s not a bug?
Installing from the GUI via the kwinscript
file that is now in the repo has worked for me, and when that method or the install script works (it’s always worked for me) the KWin script works great. I can also activate/deactivate and remove the KWin script through the KWin Scripts
settings panel with no apparent issue or error message. It’s only the terminal command that’s giving me this error.