There are few new changes from the last post. As I mentioned how will What to test section looks like – it is fully working now. Give it a try!
One of the most satisfying thing for me is progress bar. It’s great that you can see how many per cent of packages is loaded.
Karma user filter support ‘Karma not submitted by user’ and ‘Karma submitted by user’ now. So you can look for both types of updates.
I am using QThread, QSignal and Python Queue for threads and transferring data between spawned threads and main thread. Application is randomly crashing on random places and I am not sure where is the problem. I tried to get the shortest backtrace and filled a bug. I’ve discussed it with Python maintainer in Red Hat and he said that’s probably bug in QT so I hope it is true and will be fixed soon. Now I am trying to workaround it or to find a problem in my code.
If you have some suggestions please let me know.
Do you want to try Fedora Gooey Karma? See this!
Fedora Gooey Karma now has its own repository! It was developed by examon (Tomas Meszaros) who wrote some basic functionality before. I’ve forked his repository and created a new one which will be the main for Google Summer of Code.
Problem with threads
Tomas did a lot of great work but the code needed some tweaks. The main problem I’ve hit was with threads in Python. BodhiClient query started from thread got stuck in deadlock. It’s important to have internet queries in different thread than main GUI to don’t get it freeze for user.
So I filled a bug 972429 against fedora-python (it contains BodhiClient class) because I thought it’s problem with that. After IRC discussion with Toshio Kuratomi we figured out that problem is in implementation of python (or QT) threads. Thread cannot be spawned from imported library as it’s mentioned on the very bottom of official docs page.
Firstly, other than in the main module, an import should not have the side effect of spawning a new thread and then waiting for that thread in any way. Failing to abide by this restriction can lead to a deadlock if the spawned thread directly or indirectly attempts to import a module.
This problem was pretty serious because Tomas’s code has pretty much everything imported from one main file. I had to rewrite it to some “less abstract” code. I’ve split classes to separated files. Now we have two main “workers”. 🙂 One is for packages which get info mainly from RPM database or YUM. Second one is communicating with Bodhi servers. Application spawns 15 threads of Bodhi workers now and I hope it will be good enough to have relevant results from servers in quite a short time.
You can see these changes in this and this commit.
What to do next
Now I’m going to edit Makefile to have it properly “installable” on system because it’s runnable from src/fedora-gooey-karma which can be a little confusing for random strangers now. 🙂