From owner-freebsd-questions@FreeBSD.ORG Fri Oct 12 17:55:33 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 60F9516A420 for ; Fri, 12 Oct 2007 17:55:33 +0000 (UTC) (envelope-from erikt@midgard.homeip.net) Received: from ch-smtp02.sth.basefarm.net (ch-smtp02.sth.basefarm.net [80.76.149.213]) by mx1.freebsd.org (Postfix) with ESMTP id E224B13C442 for ; Fri, 12 Oct 2007 17:55:32 +0000 (UTC) (envelope-from erikt@midgard.homeip.net) Received: from c83-253-31-60.bredband.comhem.se ([83.253.31.60]:55768 helo=falcon.midgard.homeip.net) by ch-smtp02.sth.basefarm.net with esmtp (Exim 4.68) (envelope-from ) id 1IgOjS-0003cc-93 for freebsd-questions@freebsd.org; Fri, 12 Oct 2007 19:55:31 +0200 Received: (qmail 73424 invoked from network); 12 Oct 2007 19:55:30 +0200 Received: from owl.midgard.homeip.net (10.1.5.7) by falcon.midgard.homeip.net with ESMTP; 12 Oct 2007 19:55:30 +0200 Received: (qmail 32239 invoked by uid 1001); 12 Oct 2007 19:55:30 +0200 Date: Fri, 12 Oct 2007 19:55:30 +0200 From: Erik Trulsson To: James Message-ID: <20071012175530.GA32203@owl.midgard.homeip.net> Mail-Followup-To: James , Robert Huff , freebsd-questions References: <1192134379.33933.9.camel@secretariat.lanl.gov> <470E8D3A.8010508@daleco.biz> <1192136857.33933.18.camel@secretariat.lanl.gov> <20071011211317.GA24658@owl.midgard.homeip.net> <1192138145.33933.21.camel@secretariat.lanl.gov> <18190.41045.40653.528498@jerusalem.litteratus.org> <1192142367.33933.32.camel@secretariat.lanl.gov> <1192208279.33933.84.camel@secretariat.lanl.gov> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1192208279.33933.84.camel@secretariat.lanl.gov> User-Agent: Mutt/1.5.16 (2007-06-09) X-Originating-IP: 83.253.31.60 X-Scan-Result: No virus found in message 1IgOjS-0003cc-93. X-Scan-Signature: ch-smtp02.sth.basefarm.net 1IgOjS-0003cc-93 b7034ac56ba1b326458a02870a59690e Cc: Robert Huff , freebsd-questions Subject: Re: I performed an rm -r on /var/lib/pkg X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Oct 2007 17:55:33 -0000 On Fri, Oct 12, 2007 at 10:57:59AM -0600, James wrote: > > This isn't quite as simple as I'd hoped it'd be to fix. Here's my > findings thus far (I haven't started writing my script yet, but I will > later today): > > 1. /usr/ports/distfiles contains everything I need > 2. distfiles contains several versions of some packages, but that's > pretty trivial to resolve. > 3. distfiles contains some packages whose source tarballs are named > *differently* to the packages themselves, such as unrar. A few more problems: a) Not every port will have a corresponding tarball in /usr/ports/distfiles. A few ports have all the source directly in the ports tree. This means that your point 1) above is not necessarily true. b) Several ports have many tarballs in /usr/ports/distfiles c) A few of the tarballs can be used by more than one port. > > It's number 3 that's getting me. It looks like the simplest thing might > be an if statement: > > if (make search name=$PACKAGE) > score! > else > grep -r $PACKAGE /usr/ports > > But before I go that far, I wanted to see if anyone had an alternate > idea for what might work. -- Erik Trulsson ertr1013@student.uu.se