Bug 689627

Summary: zypper and packagekit: even though packagekitd has stopped, zypper doesn't know this
Product: [openSUSE] openSUSE 11.4 Reporter: Jon Nelson <jnelson-suse>
Component: libzyppAssignee: Duncan Mac-Vicar <dmacvicar>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P2 - High CC: dmacvicar, meissner, timshel
Version: Final   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Jon Nelson 2011-04-25 16:12:34 UTC
User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:2.0.0) Gecko/20100101 Firefox/4.0

[jnelson@worklaptop:~] sudo zypper -v up 'kernel-*'
root's password:
Verbosity: 1
Non-option program arguments: 'kernel-*' 
PackageKit is blocking zypper. This happens if you have an updater applet or other software management application using PackageKit running.
Tell PackageKit to quit? [yes/no] (no): yes
PackageKit is still running (probably busy).
Try again? [yes/no] (no): yes
PackageKit is still running (probably busy).
Try again? [yes/no] (no): yes
PackageKit is still running (probably busy).
Try again? [yes/no] (no): yes
PackageKit is still running (probably busy).

<killall packagekid here -- packagekitd is not running>

Try again? [yes/no] (no): yes
PackageKit is still running (probably busy).

^^^ expected zypper to note that packagekitd is not running. It IS NOT RUNNING.

Try again? [yes/no] (no): yes
PackageKit is still running (probably busy).
Try again? [yes/no] (no): yes
PackageKit is still running (probably busy).
Try again? [yes/no] (no): yes
PackageKit is still running (probably busy).
Try again? [yes/no] (no): yes
PackageKit is still running (probably busy).

<control-c here, re-start zypper.  It (properly) does not detect packagekitd running>


...


This happens EVERY TIME packagekitd is running and I need to use zypper.



Reproducible: Always

Steps to Reproduce:
1.
2.
3.
Comment 1 Duncan Mac-Vicar 2011-04-26 12:58:07 UTC
I am trying to reproduce this bug (I have been victim of it sometimes) but I can't reproduce it :-(
Comment 2 Duncan Mac-Vicar 2011-04-26 13:04:38 UTC
If you see this in 11.4, I would be interested on what this command (as root) returns when packagekit is blocking:

dbus-send --system --dest=org.freedesktop.DBus --type=method_call --print-reply --reply-timeout=200 /org/freedesktop/DBus org.freedesktop.DBus.NameHasOwner string:org.freedesktop.PackageKit

(this should answer true if packagekit is running and false if not, zypper uses this)

And also, I would be interested to see if this commands unblocks it:

 dbus-send --system --dest=org.freedesktop.PackageKit --type=method_call /org/freedesktop/PackageKit org.freedesktop.PackageKit.SuggestDaemonQuit

This is what zypper uses to ask packagekit to quit.
Comment 3 Duncan Mac-Vicar 2011-04-27 08:47:29 UTC
*** Bug 678708 has been marked as a duplicate of this bug. ***
Comment 4 Jon Nelson 2011-05-02 12:08:58 UTC
Happened again today.

worklaptop:~ # dbus-send --system --dest=org.freedesktop.DBus --type=method_call --print-reply --reply-timeout=200 /org/freedesktop/DBus org.freedesktop.DBus.NameHasOwner string:org.freedesktop.PackageKit
method return sender=org.freedesktop.DBus -> dest=:1.12924 reply_serial=2
   boolean true
worklaptop:~ # 




The second dbus-send command also does not work.
Comment 5 Duncan Mac-Vicar 2011-07-01 07:47:30 UTC
This should improve with the update we released for 11.4