From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 8 11:39:46 2012 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A5C8106564A for ; Sun, 8 Jul 2012 11:39:46 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id DC6B18FC14 for ; Sun, 8 Jul 2012 11:39:45 +0000 (UTC) Received: by bkcje9 with SMTP id je9so4822013bkc.13 for ; Sun, 08 Jul 2012 04:39:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=Kvm57G5mEb2VrAvztscWQN6yDGev6BN0fU1yIM5GD0M=; b=BOHugCGlEWbW7MW1w2Foc4lv5NT3Ow8z5e5nv8c+QZNSG6w8nb6nHHuf5uA06LDc0v HV/SJId4tFaTZcuXsU/S2PeAkwTGovkwtDfweTNkU7BcJ5i5plWdAAd6XuZGHe03gvqG 5XwxTIyAFyNl9mJQSYxR1RsovcfX8HcTpk8TB58BId/0MdDnwSz780weNtsBF7Pf+Lo5 GFeblLk+uMs1zcDgio2JzaPBzpsdswDx4ID2VX7xdEsB/3iuqIeAyMchNffJezXaX7am osEdhKclo8IoCHGiTbPG29et08yM832d91/hTFTXKyIN5DilpJAq4ODmzzH62oJXVK6k l9kQ== Received: by 10.204.152.137 with SMTP id g9mr18494275bkw.95.1341747584675; Sun, 08 Jul 2012 04:39:44 -0700 (PDT) MIME-Version: 1.0 Sender: utisoft@gmail.com Received: by 10.204.49.87 with HTTP; Sun, 8 Jul 2012 04:39:14 -0700 (PDT) In-Reply-To: <8E9DECBB-3D1E-4129-A958-9DB0DF69ECC3@kientzle.com> References: <86bojxow6x.fsf@ds4.des.no> <4FF35864.5030109@FreeBSD.org> <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> From: Chris Rees Date: Sun, 8 Jul 2012 12:39:14 +0100 X-Google-Sender-Auth: u8aupiYaKflksJ1sigF2InUbhss Message-ID: To: Tim Kientzle Content-Type: text/plain; charset=ISO-8859-1 Cc: hackers@freebsd.org Subject: Re: Better error messages for command not found (was Re: Pull in upstream before 9.1 code freeze?) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jul 2012 11:39:46 -0000 On 5 July 2012 01: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. Anyone looking to implement something like this could also talk to Sulev-Madis Silber (ketas on EFNet) about his code for making a universal list of files provided by all ports-- he has written a conflicts checker recently and may know some shortcuts. Chris