Red Hat Bugzilla – Bug 506455
annoying interference with yum
Last modified: 2013-03-13 01:45:14 EDT
Description of problem:
PackageKit has this irritating habit. Whenever I run yum on the command line after logging into a session, soon after the transaction, I see PackageKit waking up from it's slumber and interfering with my next yum transaction. I just need it to sleep for a while and let me complete my package management via yum if I prefer that.
Users in Fedora forum and other places are hitting this problem and just removing it entirely.
After you've used yum, PackageKit has to get new update lists as the lists and GUI are probably no longer valid. PK_ENGINE_STATE_CHANGED_PRIORITY_TIMEOUT is currently hardcoded to 5 seconds, so if you start the next yum transaction less than 5 seconds after the first then it shouldn't interfere. If you want to stop the yum plugin completely, just remove PackageKit-yum-plugin, although then don't complain that PackageKit thinks you have updates you've already installed.
What we could do is be more clever about when we poke PackageKit, as at the moment we do it on all posttrans_hooks, even for things like searching.
5 seconds seems just designed to interfere. How about something more reasonable like 10 minutes? I don't understand why PackageKit can't wait for the next run and update its lists at that time instead of hurriedly doing so. The typical user experience is that PackageKit is quiet until the time user does something with yum and next yum command is waiting on PackageKit for a while.
For example, I do
* yum search quake3, get the results
* PackageKit kicks in
* yum install quake3
* PackageKit is locking
* Waiting for another a minute or so till PackageKit clears up
* Yum operation continues
This is obviously not a pleasant experience.
(In reply to comment #2)
> * yum search quake3, get the results
> * PackageKit kicks in
Are you sure? posttrans_hook shouldn't get called on search operations.
It turned off PackageKit for a while because of this issue and going from memory. Not 100% sure. Substitute search for something else. It is still a annoyance.
Author: Richard Hughes <firstname.lastname@example.org>
Date: Wed Jun 17 15:32:06 2009 +0100
Don't hardcode the StateChangedTimeout's and add them to the config file
:100644 100644 6e8fe42... aba3b06... M etc/PackageKit.conf.in
:100644 100644 0d88e46... c9983a9... M src/pk-engine.c
In the next version you can set these to much higher by tweaking /etc/PackageKit/PackageKit.conf. I think it's important to have a low number by default so PackageKit doesn't lie to the user.
This appears to be a unbreak me preference
I wish we had a better way of solving this problem. I think if you change the default timeout to atleast a few mins, it would be more reasonable.
The better way of solving this would be to stop using yum on the command line, either using GUI tools or pkcon. I've put that code in place to trigger after such a little time so that the update icon and viewer never display incorrect data. It's a compromise, one that you think I've got set to small, but I even think 5 seconds is quite generous.
If you use yum shell you can do multiple operations without closing yum and thus forcing PK to whir back up.