From owner-freebsd-ports@FreeBSD.ORG Sun Nov 21 04:05:14 2010 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AAFC6106564A for ; Sun, 21 Nov 2010 04:05:14 +0000 (UTC) (envelope-from corky1951@comcast.net) Received: from qmta05.emeryville.ca.mail.comcast.net (qmta05.emeryville.ca.mail.comcast.net [76.96.30.48]) by mx1.freebsd.org (Postfix) with ESMTP id 8EC028FC0A for ; Sun, 21 Nov 2010 04:05:14 +0000 (UTC) Received: from omta14.emeryville.ca.mail.comcast.net ([76.96.30.60]) by qmta05.emeryville.ca.mail.comcast.net with comcast id Zfpr1f0021HpZEsA5g5EFB; Sun, 21 Nov 2010 04:05:14 +0000 Received: from comcast.net ([98.203.142.76]) by omta14.emeryville.ca.mail.comcast.net with comcast id Zg5C1f0021f6R9u8ag5Cy4; Sun, 21 Nov 2010 04:05:13 +0000 Received: by comcast.net (sSMTP sendmail emulation); Sat, 20 Nov 2010 20:05:11 -0800 Date: Sat, 20 Nov 2010 20:05:11 -0800 From: Charlie Kester To: freebsd-ports@freebsd.org Message-ID: <20101121040511.GC48679@comcast.net> Mail-Followup-To: freebsd-ports@freebsd.org References: <20101121012336.GM13998@comcast.net> <20101121032306.GB48679@comcast.net> <19688.37613.144903.851371@jerusalem.litteratus.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <19688.37613.144903.851371@jerusalem.litteratus.org> X-Mailer: Mutt 1.5.20 X-Composer: Vim 7.2 User-Agent: Mutt/1.5.20 (2009-06-14) Subject: Re: How to detect filename conflicts with uninstalled ports? 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: Sun, 21 Nov 2010 04:05:14 -0000 On Sat 20 Nov 2010 at 19:33:01 PST Robert Huff wrote: > >Charlie Kester writes: > >> On Sat 20 Nov 2010 at 17:23:37 PST Charlie Kester wrote: >> >I'm working on a new port that installs a program with a name that seems >> >like it would already be taken, but I don't have anything by that name >> >on my system -- even though I have lots of ports installed. >> > >> >I know that I can use "portsdb -r" to find all the ports that depend on >> >a given port, whether they're installed or not. Is there a similar way >> >to determine if an uninstalled port installs a file with a given name? >> >> As someone kindly reminded me, "find" and "grep" are my friends: >> >> $ cd /usr/ports >> $ find . -name "pkg-plist" -exec grep -H "bin/progname" {} \; >> $ find . -name Makefile -exec grep -H "bin/progname" {} \; > > The former accounts for static packing lists; does the second >do the same for dynamic packing lists? Probably not. I was just thinking of ports that define PLIST_FILES in their Makefiles, in lieu of a pkg-plist. But I expect these two find & greps will detect the majority of filename conflicts. Unless someone has a better recommendation, I'll settle for less than perfect. Besides, the Porter's Handbook strongly discourages the use of dynamic package lists (although it does not forbid them). So if I'm not aware of a conflict with someone else's port that uses them anyway, I figure it's as much their fault as mine. ;)