Bug 554801 - command-not-found won't provide package if command is "similar" to installed command
Summary: command-not-found won't provide package if command is "similar" to installed ...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: PackageKit
Version: 12
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Richard Hughes
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-01-12 17:44 UTC by Edward Rudd
Modified: 2010-03-22 16:45 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-03-22 16:45:23 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
FreeDesktop.org 27246 0 None None None Never

Description Edward Rudd 2010-01-12 17:44:43 UTC
Description of problem:
I am trying to run "kompare" (the KDE compare/diff GUI) but pk-command-not-found suggests I should run "compare" instead.

Version-Release number of selected component (if applicable):
PackageKit-0.5.5-1.fc12@x86_64

How reproducible:
with similar names, every time.
ie.
kompare vs compare
htop vs top

Steps to Reproduce:
1. open a shell and have PackageKit-command-not-found installed
2. run a "similar" but uninstalled known command to something installed (ie.. htop)
  
Actual results:
Command not found. Similar command is: 'top'

Expected results:
asking me to install htop.

Comment 1 Steven M. Parrish 2010-01-17 15:52:49 UTC
This bug has been triaged

Steven M. Parrish
KDE & Packagekit Triager 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 2 Richard Hughes 2010-01-19 17:58:32 UTC
(In reply to comment #0)
> 1. open a shell and have PackageKit-command-not-found installed
> 2. run a "similar" but uninstalled known command to something installed (ie..
> htop)

Isn't that what it's meant to do? Can't you edit /etc/PackageKit/CommandNotFound.conf and make it how you like it?

Comment 3 Edward Rudd 2010-01-19 22:51:14 UTC
ahh.. didn't notice that config file there..  However it doesn't really resolve the issue.  If I set the configuration option SingleMatch to ignore instead of warn it simple states "command not found" and doesn't offer "htop" as a possible package (or kdesdk for kompare).

If I set SingleMatch to ask it asks "do you want to run top?".

This is really a "complex" issue unfortunately.. As which should take precedence.. the available packages in the repository OR the typo?  Right now the typo is taking precedence, and there doesn't seem to be a way to change that.

Switching the precedence will resolve the issue for me, but will it cause new issues of "I really did typo and I don't want to install a command I've never heard of before.  Can you REALLY tell me what the possible matches of installed packages are?"

Possibly options to resolve this may be
1) a new preference should be added to change the precedence of scanning
2) have a preference to show BOTH new packages and typo resolutions.

(either way this probably needs to be filed upstream)

Comment 4 Richard Hughes 2010-03-22 16:45:23 UTC
(In reply to comment #3)
> (either way this probably needs to be filed upstream)    

Agreed, with a patch please :-)


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