From owner-freebsd-ports@FreeBSD.ORG Fri Dec 23 14:41:47 2005 Return-Path: X-Original-To: freebsd-ports@freebsd.org Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7140916A420 for ; Fri, 23 Dec 2005 14:41:47 +0000 (GMT) (envelope-from vd@datamax.bg) Received: from jengal.datamax.bg (jengal.datamax.bg [82.103.104.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2DC8C43D9C for ; Fri, 23 Dec 2005 14:41:27 +0000 (GMT) (envelope-from vd@datamax.bg) Received: from qlovarnika.bg.datamax (qlovarnika.bg.datamax [192.168.10.2]) by jengal.datamax.bg (Postfix) with SMTP id 740F9B854; Fri, 23 Dec 2005 16:41:21 +0200 (EET) Received: (nullmailer pid 41926 invoked by uid 1002); Fri, 23 Dec 2005 14:41:21 -0000 Date: Fri, 23 Dec 2005 16:41:21 +0200 From: Vasil Dimov To: "Michael C\. Shultz" Message-ID: <20051223144121.GA41892@qlovarnika.bg.datamax> References: <20051222164021.GA30104@qlovarnika.bg.datamax> <200512220849.42549.ringworm01@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="cNdxnHkX5QqsyA0e" Content-Disposition: inline In-Reply-To: <200512220849.42549.ringworm01@gmail.com> X-OS: FreeBSD 6.0-STABLE User-Agent: Mutt/1.5.11 Cc: freebsd-ports@freebsd.org Subject: Re: portsearch: how to display search results X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: vd@datamax.bg List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Dec 2005 14:41:47 -0000 --cNdxnHkX5QqsyA0e Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 22, 2005 at 08:49:41AM -0800, Michael C. Shultz wrote: > On Thursday 22 December 2005 08:40, Vasil Dimov wrote: > > Hi all, > > > > I am working on a tool that will allow easy (portsearch -f something) > > and fast (less than a few seconds) to search for ports that install > > some file. > > > > I see two options for displaying the results: > > > > 1) the simple way > > Show each file that matches a given pattern with some information for > > the port that would install it. This means that one port may be shown > > more than once, which I find really irritating. > > > > Here is an example output when searching for files that match the > > regular expression bin/f.* > > > > Port: portabc > > File: bin/f1 > > > > Port: portabc > > File: bin/f2 > > > > Port: portxyz > > File: bin/f3 > > > > > > 2) group files by port > > Show ports that have at least one file matching a given pattern with all > > the matching files they install > > > > Output from the same search criteria: > > > > Port: portabc > > File(s): bin/f1, bin/f2 > > > > Port: portxyz > > File(s): bin/f3 > > > > > > My research shows that Debian's ``apt-file search'' and Fedora's > > ``yum provides'' use "the simple way" and display one package more > > than once. But 2) seems to me to be the prettier output. > > > > What do you think? >=20 > I prefer the files grouped by port, do you have a working example yet? I'd > like to give it a test run. Thanks for your response. I implemented grouping and now 1) can easily be supported, e.g. the prog will support both modes via some command line options. I have a working program, but I want to make some cleanup before fireing it out. Happy holidays! --=20 Vasil Dimov --cNdxnHkX5QqsyA0e Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- iD8DBQFDrAyRFw6SP/bBpCARAl92AKChaLZ7RLTreILuDct7AOJpCf5b0gCfdXCY c01HxWJPO0sMC7U4DAxlfwU= =zVje -----END PGP SIGNATURE----- --cNdxnHkX5QqsyA0e--