[Bug 580513] New: zypper: Suggest to PackageKit daemon to quit
http://bugzilla.novell.com/show_bug.cgi?id=580513 http://bugzilla.novell.com/show_bug.cgi?id=580513#c0 Summary: zypper: Suggest to PackageKit daemon to quit Classification: openSUSE Product: openSUSE 11.3 Version: Factory Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: libzypp AssignedTo: zypp-maintainers@forge.provo.novell.com ReportedBy: vuntz@novell.com QAContact: qa@suse.de Found By: --- Blocker: --- It's a bit annoying to have zypper unusable because of PackageKit running. It turns out we can suggest to the PackageKit daemon to quit. Here's how to do it with dbus-send: 1) First call: dbus-send --system --dest=org.freedesktop.DBus --type=method_call --print-reply --reply-timeout=200 / org.freedesktop.DBus.NameHasOwner string:org.freedesktop.PackageKit It will output "boolean true" if PackageKit is running. 2) If it's running, call: /bin/dbus-send --system --dest=org.freedesktop.PackageKit --type=method_call /org/freedesktop/PackageKit org.freedesktop.PackageKit.SuggestDaemonQuit You probably need to wait a bit (less than 1s anyway) to make sure it quits; if it doesn't, then it means that it's busy doing something. It'd be nice to integrate this in zypper if possible. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=580513
http://bugzilla.novell.com/show_bug.cgi?id=580513#c1
--- Comment #1 from Vincent Untz
http://bugzilla.novell.com/show_bug.cgi?id=580513
http://bugzilla.novell.com/show_bug.cgi?id=580513#c2
Duncan Mac-Vicar
http://bugzilla.novell.com/show_bug.cgi?id=580513
http://bugzilla.novell.com/show_bug.cgi?id=580513#c3
Ján Kupec
http://bugzilla.novell.com/show_bug.cgi?id=580513
http://bugzilla.novell.com/show_bug.cgi?id=580513#c4
--- Comment #4 from Vincent Untz
http://bugzilla.novell.com/show_bug.cgi?id=580513
http://bugzilla.novell.com/show_bug.cgi?id=580513#c5
Ján Kupec
http://bugzilla.novell.com/show_bug.cgi?id=580513
http://bugzilla.novell.com/show_bug.cgi?id=580513#c6
Vincent Untz
http://bugzilla.novell.com/show_bug.cgi?id=580513
http://bugzilla.novell.com/show_bug.cgi?id=580513#c7
Michael Andres
http://bugzilla.novell.com/show_bug.cgi?id=580513
http://bugzilla.novell.com/show_bug.cgi?id=580513#c8
Ján Kupec
Shouldn't this be done IFF aquiring the zypp lock fails
Yes, i can do it. We could even check whether dbus is running at all first.
(maybe AND ZYppFactoryException::locker_pid() hints to Packagekit)?
How do i find out it's PackageKit? From the exception message? -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=580513
http://bugzilla.novell.com/show_bug.cgi?id=580513#c9
--- Comment #9 from Ján Kupec
http://bugzilla.novell.com/show_bug.cgi?id=580513
http://bugzilla.novell.com/show_bug.cgi?id=580513#c10
Michael Andres
(In reply to comment #7)
How do i find out it's PackageKit? From the exception message?
ZYppFactory::getZYpp throws ZYppFactoryException if zypp is locked. ZYppFactoryException::locker_pid() returns you the pid. Zypp reads /proc/[pid]/cmdline to get the name. Unfortunately Arvin did not add a locker_name method too, in order to pass along the name. I change it now for 11.3 in git: ZYppFactoryException::lockerPid/lockerName
Was it some unusual circumstance or can this normally happen?
Here it is a small test system without dbus, but I can imagine building appliances without dbus too. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=580513
http://bugzilla.novell.com/show_bug.cgi?id=580513#c11
--- Comment #11 from Atri Bhattacharya
http://bugzilla.novell.com/show_bug.cgi?id=580513
http://bugzilla.novell.com/show_bug.cgi?id=580513#c12
Ján Kupec
http://bugzilla.novell.com/show_bug.cgi?id=580513
http://bugzilla.novell.com/show_bug.cgi?id=580513#c13
--- Comment #13 from Thomas Göttlicher
That's a question for Thomas, CCing him. Please request features via fate. Thanks.
-- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=580513
http://bugzilla.novell.com/show_bug.cgi?id=580513#c14
--- Comment #14 from Atri Bhattacharya
Please request features via fate. Thanks.
Done. https://features.opensuse.org/309367 Thanks and hoping this will be implemented. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=580513
http://bugzilla.novell.com/show_bug.cgi?id=580513#c15
Ján Kupec
(In reply to comment #8)
(In reply to comment #7) How do i find out it's PackageKit? From the exception message?
Zypp reads /proc/[pid]/cmdline to get the name. Unfortunately Arvin did not add a locker_name method too, in order to pass along the name.
I change it now for 11.3 in git: ZYppFactoryException::lockerPid/lockerName
Nice. Done in zypper 1.4.4. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=580513
http://bugzilla.novell.com/show_bug.cgi?id=580513#c
Ján Kupec
participants (1)
-
bugzilla_noreply@novell.com