Bug 494048 - command-not-found handler hangs waiting for package manager lock
command-not-found handler hangs waiting for package manager lock
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: PackageKit (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Richard Hughes
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-04-03 16:53 EDT by Earth
Modified: 2009-04-15 12:23 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-04-15 12:23:52 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 Earth 2009-04-03 16:53:34 EDT
Description of problem:
The command-not-found handler hangs if another application has the package manager lock.

Steps to Reproduce:
1. Install packagekit-command-not-found
2. Use the Add/Remove software application, or Update System, or run a yum command so that an application has the package manager lock
3. Open a terminal
4. Run a command found in a Fedora package but not installed on your system, eg. 'sl'

Expected results:
'Command not found. Install package 'sl' to provide command 'sl'? [N/y]'  

Actual results:
'Command not found.'
(hangs until package manager lock is released)

This is frustrating, as the handler is intended to speed up using the terminal, and this is an unexplained hang when most users having read 'Command not found' expect to have been immediately returned to the prompt.

Of course, does the handler need the package lock? If it were to cache the list periodically, could it be as snappy as "bash: command not found."? 


Aside: I'm torn between whether I prefer the functionality of this handler or the one in Ubuntu. Ubuntu prints the name of the package and returns, PackageKit asks the user if they want to install the package and waits for an answer. The latter interrupts flow if you mistype 'sl' for 'ls', but if you did intend the command, it gets the package and then executes your command for you which is damn cool :)
Comment 1 Richard Hughes 2009-04-06 05:27:52 EDT
(In reply to comment #0)
> Of course, does the handler need the package lock?

Yes, yum can't query the database without the lock.

> Aside: I'm torn between whether I prefer the functionality of this handler or
> the one in Ubuntu. Ubuntu prints the name of the package and returns,
> PackageKit asks the user if they want to install the package and waits for an
> answer. The latter interrupts flow if you mistype 'sl' for 'ls', but if you did
> intend the command, it gets the package and then executes your command for you
> which is damn cool :)  

You can configure all this stuff in /etc/PackageKit/CommandNotFound.conf

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