Bug 506455 - annoying interference with yum
annoying interference with yum
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: gnome-packagekit (Show other bugs)
11
All Linux
low Severity medium
: ---
: ---
Assigned To: Richard Hughes
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-06-17 08:28 EDT by Rahul Sundaram
Modified: 2013-03-13 01:45 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-06-17 11:24:04 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Rahul Sundaram 2009-06-17 08:28:08 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.
Comment 1 Richard Hughes 2009-06-17 08:55:58 EDT
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.
Comment 2 Rahul Sundaram 2009-06-17 09:20:45 EDT
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.
Comment 3 Richard Hughes 2009-06-17 10:32:25 EDT
(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.
Comment 4 Rahul Sundaram 2009-06-17 10:46:38 EDT
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.
Comment 5 Richard Hughes 2009-06-17 11:24:04 EDT
commit 608968f530df37fa0d83cccec7a6c036396eb8b8
Author: Richard Hughes <richard@hughsie.com>
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.
Comment 6 Rahul Sundaram 2009-06-18 06:23:34 EDT
This appears to be a unbreak me preference

http://www106.pair.com/rhp/free-software-ui.html

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.
Comment 7 Richard Hughes 2009-06-18 06:35:04 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.