Quantcast
Channel: openSUSE Planet - Global
Viewing all articles
Browse latest Browse all 23308

Saurabh Sood: Cancelling Installation – A DBus Implementation

$
0
0

This was a problem bugging me since quite some time. The cancel installation was not implemented properly. I was just closing the frontend on the click of the close button, creating a terrifying zombie, and creating the illusion that the installation cancels, when in fact it succeeds. the underlying problem was that the backend, which is a root level process, and spawns zypper, which is another (root level process) must be terminated by the frontend, which is a user level process.

I thought of many approaches for accomplishing this:

1.) Brute Force file based approach using QFileSystemWatcher
2.) QSharedMemory
3.) DBus

I did not want to go in for a file based approach, considering its inefficiencies, and that I was just creating too many files. With QSharedMemory, I ran into problems, that I couldnt have a callback on change of a variable, which I had planned.

Enter DBus. I was initially hesitant to use this approach, as I was not very comfortable with it. I was helped a great deal by my mentor, and a friend Srijan Mukherjee, who is a fellow intern at Honeywell. I created a base DBus skeleton, and attached it to my existing code. Voila! It works now, and is awaiting review by my mentor. A huge headache is over!



Viewing all articles
Browse latest Browse all 23308


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>