Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 04 Jul 2012 17:34:13 -0700
From:      Doug Barton <dougb@FreeBSD.org>
To:        Tim Kientzle <tim@kientzle.com>
Cc:        hackers@freebsd.org, Mike Meyer <mwm@mired.org>
Subject:   Re: Better error messages for command not found (was Re: Pull in upstream before 9.1 code freeze?)
Message-ID:  <4FF4E105.50502@FreeBSD.org>
In-Reply-To: <8E9DECBB-3D1E-4129-A958-9DB0DF69ECC3@kientzle.com>
References:  <86bojxow6x.fsf@ds4.des.no> <4FF35864.5030109@FreeBSD.org> <CAC8HS2Hx%2BqV1zYSzyM6wYzbyA6BStd3HEwc-VDhv40DHM=qCvw@mail.gmail.com> <CAOjFWZ5ikPz_yDhEQutiXVG354qRHYJTn-M_S4Cx-=YRgFP7eQ@mail.gmail.com> <20120704185104.GA42355@DataIX.net> <4FF4B36A.2040608@FreeBSD.org> <20120704180134.7c649e1b@bhuda.mired.org> <4FF4BEED.10103@FreeBSD.org> <20120704225519.GB19945@DataIX.net> <4FF4CAD1.8080804@FreeBSD.org> <20120704234104.GA392@DataIX.net> <8E9DECBB-3D1E-4129-A958-9DB0DF69ECC3@kientzle.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 07/04/2012 17:30, Tim Kientzle wrote:
> On Jul 4, 2012, at 4:41 PM, Jason Hellenthal wrote:
>>
>> On Wed, Jul 04, 2012 at 03:59:29PM -0700, Doug Barton wrote:
>>> On 07/04/2012 15:55, Jason Hellenthal wrote:
>>>> Seeing as sudo plays a big part of this
>>>
>>> No ... not only is sudo not a necessary component, it shouldn't be
>>> involved at all. The feature works on debian/ubuntu for regular
>>> userspace commands.
>>>
>>
>> What are they using to authenticate for the install ? do you know ?
> 
> Huh?  What install?  Who's talking about install?
> 
> The version of this I've seen looks like this:
> 
> $ svn co https://some.url/
> svn: Command not found.
>   To use this command, install one of the following packages:
>       devel/subversion
>       devel/subversion-freebsd
>       devel/subversion16
> 
> That's all it does:  It just prints out a more informative error message.
> It does not install anything, it requires no special permissions,
> and does not (as far as I can see) introduce any security or
> performance problems.
> 
> The implementation is pretty simple:
>  * A tool for building a database that maps command names
>    to package names.  (This would run against a ports tree or
>    package repository.  Conceptually, it's pretty similar to
>    how port/package indexes get built today.)
>  * Some way to distribute that database (Probably as part of ISO
>    releases, maybe extend 'portsnap' or 'pkg_add' to update it?)
>  * A program to look up command names in that database
>    and print out the results.
>  * A shell hook to run said program whenever a "command not found"
>    error occurs.
> 
> As a first prototype, the database could just be a text file
> and the look up program could be a shell script that uses
> grep and sed.

Right-O. The db should almost certainly be updated and distributed as
part of the (already automated) INDEX generation and distribution process.

Doug

-- 

    This .signature sanitized for your protection





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4FF4E105.50502>