Summary: | remove Dolphin's Ruby dependency by converting service menu installation scripts to Python | ||
---|---|---|---|
Product: | [Applications] dolphin | Reporter: | skierpage <skierpage> |
Component: | general | Assignee: | Dolphin Bug Assignee <dolphin-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | minor | CC: | aspotashev, ego.cordatus, elvis.angelaccio, kde, mail, nate, rdieter |
Priority: | NOR | Keywords: | junior-jobs |
Version: | 18.04.3 | ||
Target Milestone: | --- | ||
Platform: | Fedora RPMs | ||
OS: | Linux | ||
Latest Commit: | https://commits.kde.org/dolphin/1aaafe178c77e234e08565cc24f58887a7d5e0be | Version Fixed In: | 19.08.0 |
Description
skierpage
2018-09-30 02:13:20 UTC
I've currently rewritten servicemenudeinstallation in Python 3 and am just testing it out further. Hope to have this finished by next week and put it in place for systems testing. It seems like a good first project and so I might need some help submitting / cleaning up. Neato, let me know if you need a hand submitting it as a patch using http://phabricator.kde.org/. The documentation is here: https://community.kde.org/Infrastructure/Phabricator Sorry it's taking me longer than expected. I'm just trying to double-check my Python script but can't seem to invoke even the original /usr/bin/servicemenudeinstallation through Control->Configure Dolphin->Services->Download New Services. I install a plugin and then uninstall it which should log to a file and also create a kdialog. Nothing seems to be happening. I've modified the original Ruby servicemenudeinstallation. How can I check where it's being called from? Can't find anything in TechBase and I've grepped the whole system for the /usr/bin/servicemenudeinstallation (dirty, I know). It should call the script from /usr/bin/. I guess you should check whether you have some syntax errors in the changes you've done. You are correct. Syntax issues with my code. This is a little bit embarrassing haha. The only concern I have is that Dolphin still shows the Uninstall as successful, when quite clearly the program has failed. I'll keep going and finish this up. I'm coming to the realization that none of these scripts work particularly well. I have not been able to install (or uninstall) any of the downloaded Services (most downloads) for Dolphin. `.desktop` files fail at the `qtpaths --writable-path GenericDataLocation` on my fresh install of KDE Neon, and will also try going into a directory that doesn't exist. I believe this was written for KDE4 and hasn't really been updated for Plasma5. Can someone please confirm my findings? /usr/bin/servicemenuinstallation fails at `$servicedir = `qtpaths --writable-path GenericDataLocation`.strip! + "/kservices5/ServiceMenus/"` /usr/bin/servicemenudeinstallation fails at the same line of code (if the file is a .desktop) or will fail at `dd = Dir.new(dir)` (as the folder does not exist) Happy to rewrite for new plugin support. Just need to make sure this isn't just me (In reply to Peter from comment #6) > I'm coming to the realization that none of these scripts work particularly > well. I have not been able to install (or uninstall) any of the downloaded > Services (most downloads) for Dolphin. `.desktop` files fail at the `qtpaths > --writable-path GenericDataLocation` on my fresh install of KDE Neon, and > will also try going into a directory that doesn't exist. I believe this was > written for KDE4 and hasn't really been updated for Plasma5. Can someone > please confirm my findings? No, it was updated for Plasma 5. I just tried with a couple of services, one was installed and the other was not. I think the problem might be in the service itself. > > /usr/bin/servicemenuinstallation fails at `$servicedir = `qtpaths > --writable-path GenericDataLocation`.strip! + "/kservices5/ServiceMenus/"` This folder should be created at the beginning of servicemenuinstallation. > > /usr/bin/servicemenudeinstallation fails at the same line of code (if the > file is a .desktop) or will fail at `dd = Dir.new(dir)` (as the folder does > not exist) > > Happy to rewrite for new plugin support. Just need to make sure this isn't > just me The script can definitely be improved. It would be nice if it were at least logging failures somewhere. Here is a re-implementation of the scripts in Rust -> https://phabricator.kde.org/D21025 , it may be helpful for those who decide to rewrite it in C++: you might want to reuse the code structure. Rewritten in C++: https://phabricator.kde.org/D21878 Git commit 1aaafe178c77e234e08565cc24f58887a7d5e0be by Alexander Potashev. Committed on 14/07/2019 at 22:39. Pushed by aspotashev into branch 'master'. Rewrite servicemenu helper utility in C++ Summary: - Also support MIME type "application/x-compressed-tar". - Update tests in Ruby, remove SimpleCov. Test Plan: Ruby tests passed Reviewers: sitter, elvisangelaccio, ngraham Reviewed By: elvisangelaccio Subscribers: cfeck, kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D21878 M +2 -2 src/CMakeLists.txt M +2 -2 src/settings/services/servicemenu.knsrc D +0 -72 src/settings/services/servicemenudeinstallation D +0 -136 src/settings/services/servicemenuinstallation A +9 -0 src/settings/services/servicemenuinstaller/CMakeLists.txt A +2 -0 src/settings/services/servicemenuinstaller/Messages.sh A +387 -0 src/settings/services/servicemenuinstaller/servicemenuinstaller.cpp [License: GPL (v2/3)] M +4 -4 src/settings/services/test/service_menu_deinstallation_test.rb M +4 -4 src/settings/services/test/service_menu_installation_test.rb M +0 -69 src/settings/services/test/test_helper.rb M +0 -6 src/tests/CMakeLists.txt https://commits.kde.org/dolphin/1aaafe178c77e234e08565cc24f58887a7d5e0be |