From owner-freebsd-ports@FreeBSD.ORG Fri Aug 31 16:03:20 2012 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9F178106564A; Fri, 31 Aug 2012 16:03:20 +0000 (UTC) (envelope-from vmagerya@gmail.com) Received: from mail-vb0-f54.google.com (mail-vb0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 1B52C8FC1A; Fri, 31 Aug 2012 16:03:19 +0000 (UTC) Received: by vbmv11 with SMTP id v11so4418439vbm.13 for ; Fri, 31 Aug 2012 09:03:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=gmLX+MIEI/rly+3KhRJqsTP3d9/akf1yWHoQn+17EZg=; b=Cbyjdqi5DSRz7JO1bJDwIeV8VbzkM3645fGWeg9jVAG8mlvJyN6FJZ4wkHJI1adaWJ KQmaPwjhY0Y+ihbrSai3pcwrIr/XSCJdYjWbs1hxuCzPP5Lbt4ouEggUJ70vOOk7uUeM 7SLFw60Exrs5gZ/ItUIScV54h2XLKZm1yQeQBBeLuOkeXPcDIyVUVX0z+hFfl3ZVuzGY MzclMeJPWipWNaS6IOhvZXuJPJ2bS5WZUhudCrxjhf4mO/bz+mg/+l+TXJQ7+Bu/gtMQ +cNN+bQhlkNylQPwO55pQ/ROetxgLblxYwGkHCjdAOuKFkxU0dnWSshZwNaNzLJeeJwS mI4w== MIME-Version: 1.0 Received: by 10.220.119.204 with SMTP id a12mr6182886vcr.66.1346428993485; Fri, 31 Aug 2012 09:03:13 -0700 (PDT) Received: by 10.58.29.226 with HTTP; Fri, 31 Aug 2012 09:03:13 -0700 (PDT) In-Reply-To: <20120831153659.GD1523@glenbarber.us> References: <20120831153659.GD1523@glenbarber.us> Date: Fri, 31 Aug 2012 19:03:13 +0300 Message-ID: From: Vitaly Magerya To: Glen Barber Content-Type: text/plain; charset=UTF-8 Cc: Marin Atanasov Nikolov , current@freebsd.org, freebsd-ports@freebsd.org Subject: Re: Plugins support in pkgng X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2012 16:03:20 -0000 Glen Barber wrote: >> How about the ability to add new commands to "pkg"? >> For example something like "pkg cutleaves" via plugins would be cool. > > I think 'pkg autoremove' already does this. Does autoremove show you all the leaves and ask which ones you want removed? I honestly don't know (and can't test at the moment); I assumed it only removed the ones with "auto" flag on. In any case, what I actually want is a pkg_cleanup alternative (i.e. cutleaves with a dialog(1)-like interface). There are other utilities that could benefit from being a plugin too. For example "suggest" plugin could use hooks on the build server to construct a database of "binary name->package" mapping, and add "pkg suggest" command on the client to query that database (e.g. "pkg suggest ogg123" would suggest you to install "audio/vorbis-tools", which is an idea that has been floating around).