From owner-freebsd-questions@FreeBSD.ORG Fri Oct 12 19:04:20 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 9B42B16A417 for ; Fri, 12 Oct 2007 19:04:20 +0000 (UTC) (envelope-from jrisom@gmail.com) Received: from rn-out-0102.google.com (rn-out-0910.google.com [64.233.170.191]) by mx1.freebsd.org (Postfix) with ESMTP id 45B1013C468 for ; Fri, 12 Oct 2007 19:04:20 +0000 (UTC) (envelope-from jrisom@gmail.com) Received: by rn-out-0102.google.com with SMTP id e5so42581rng for ; Fri, 12 Oct 2007 12:04:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:in-reply-to:references:mime-version:content-type:message-id:content-transfer-encoding:cc:from:subject:date:to:x-mailer; bh=ie8qylkcrLgyllJ+FudwS1jJGDodFkI+xg0xTbD8Ats=; b=XVwwH7nMc0WBQe2iFhr+Lf1d7aV3j3OfUgildXzmUd2iweuRjgWUDqMjftwAoGRk9r6j9KLWFEcV5AL0GZZD4U7CN/rRTSJ7ApZDnQoewaNdUPmrWHqeWg3E0lLh9XKEMqMw4EFDXH29+rDxg5NDC4E9qFiAXYrcRouEUc7vL+4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:in-reply-to:references:mime-version:content-type:message-id:content-transfer-encoding:cc:from:subject:date:to:x-mailer; b=LdfoLNFFA2YttoIm+dnmhwvpfSD6fDjYA17MIqok/uLSdB1XvUiV6+xLClPPAfZa5gmd+h3cRpCiPj6ecnKK1nbBANHciVZwBbmjNjOP1N3AJBpemtR6H4s82uqlAxqdhC/9T+tBhO+Q6FukXmWsfmhoYESwFXgtun4cSK/GvQw= Received: by 10.151.10.7 with SMTP id n7mr711334ybi.1192215859252; Fri, 12 Oct 2007 12:04:19 -0700 (PDT) Received: from ?192.168.1.5? ( [74.134.230.123]) by mx.google.com with ESMTPS id 20sm1037867nzf.2007.10.12.12.04.02 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 12 Oct 2007 12:04:11 -0700 (PDT) In-Reply-To: <1192208279.33933.84.camel@secretariat.lanl.gov> 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 (Apple Message framework v624) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <9dae1159ed55c70742430b79b0f1da52@gmail.com> Content-Transfer-Encoding: 7bit From: Joshua Isom Date: Fri, 12 Oct 2007 14:03:51 -0500 To: jamesh@lanl.gov X-Mailer: Apple Mail (2.624) Cc: freebsd-questions 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 19:04:20 -0000 On Oct 12, 2007, at 11:57 AM, 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. > > 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. > > > James > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to > "freebsd-questions-unsubscribe@freebsd.org" > Try something more akin to this. find /usr/ports/devel -name distinfo -exec grep -l ddd-3.3.11.tar.gz '{}' \; | cut -d / -f 1-5 You'd have to change ddd-3.3.11.tar.gz(I used it because I had it), but you can then output a list of all the directories you need to build the port in. You can then probably use xargs to automatically make that port.