Home_greyopenFATE - openSUSE feature tracking > #305803
Dashboard | Search | Sign up | Login

Please login or register to be able to edit or vote this feature.

improve command_not_found_helper speed

Feature state

openSUSE-11.2
Done

Description

In the discussion on opensuse-factory
[opensuse-factory] issues with command-not-found speed (Message-ID: <20081210084607.GA2988@taygeta>), I've suggested a different approach:

I'd very much prefer bash to tell me without any delay: 
Command not found. If this is not a typo, type "man make-it-work" for
help.
And then the make-it-work man page will tell you right away to run
"make-it-work commandname' to locate and install the package providing
fancytool.
with a little practice you will go one back in history, prefix your last
command with 'make-it-work ' and have fun...
imho the current solution is solving a problem that doesn't really
exist (pretend all software is preinstalled) and creates a new one
(lag).

Michal Vyskocil pointed out that such magic should at least look in /sbin and /usr/sbin and give a usefull message if the command is found there:

command found in /sbin or /usr/sbin. 
Maybe retry as root, e.g. with 'sudo $command'

Testcase

  • First set COMMAND_NOT_FOUND_AUTO variable.
  • Then check the output of bash if command is not found, it should be different now

Discussion


icons/user_comment.png M. V. wrote: (5 years ago)

There was a Bug #435160[1], about a c-n-f handler speed and a most time consuming part is a satsolver, so another approach is make satsolver litle bit easier.
But I suppose that output in mentioned form should be enough too.
[1] https://bugzilla.novell.com/show_bug.cgi?id=435160

BTW: added prusnak as interested person.

icons/user_comment.png P. R. wrote: (5 years ago)

Command-not-found handler now require COMMAND_NOT_FOUND_AUTO env variable to be set.
If it is set command-not-found binary is invoked directly, otherwise it just prints info about invokation.

Last change: 5 years ago
Voting
Score: 3
  • Negative: 0
  • Neutral: 0
  • Positive: 3
Feature Export
Application-xmlXML   Text-x-logPlaintext   PrinterPrint