From owner-freebsd-questions@FreeBSD.ORG Sun Jul 25 04:30:34 2010 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 CA3351065675 for ; Sun, 25 Jul 2010 04:30:34 +0000 (UTC) (envelope-from bf1783@googlemail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 8D8C98FC16 for ; Sun, 25 Jul 2010 04:30:34 +0000 (UTC) Received: by wyj26 with SMTP id 26so1633724wyj.13 for ; Sat, 24 Jul 2010 21:30:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:received:reply-to:date :message-id:subject:from:to:cc:content-type; bh=4DPfSi2mIq8/gr20HNUVoFNozx8aIYdCMVZWcSoVCnM=; b=xjJGWTCOYuy2T77T9AmHnDbftGXD1gmkPw9W2oJMQ31QTT9jpCMtfi53nXQX5UcsWY zScZp8nGwCx1HdtYi0ftiTrbp9CIfy4OjsRPRH0PzeOq2D0Vi/XIuYuFq6JcHJJgnrth tC9c4Kp3jAK/2LRR86sQPDcBFh24hMWglesyA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:reply-to:date:message-id:subject:from:to:cc :content-type; b=Vdsel4rqzkjjVorAOWPHv7T1ljIjeiXyQLv0VKwQPFERs3bjdGiSvmFVizWVha15dl 4kKNakG7KXX7d+so8ZJSohMQoTVoIUyMHiPzqJol3oywqzzNnfsUKQjpi+nM7dD16xcg c+JqGsqGJjHrhXW3MfeYqH968sipWrWlY1XsE= MIME-Version: 1.0 Received: by 10.216.188.81 with SMTP id z59mr929949wem.106.1280032233202; Sat, 24 Jul 2010 21:30:33 -0700 (PDT) Received: by 10.216.171.10 with HTTP; Sat, 24 Jul 2010 21:30:33 -0700 (PDT) Date: Sun, 25 Jul 2010 04:30:33 +0000 Message-ID: From: "b. f." To: freebsd-questions@FreeBSD.org Content-Type: text/plain; charset=ISO-8859-1 Cc: Aiza Subject: Re: searching INDEX in .sh X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: bf1783@gmail.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Jul 2010 04:30:34 -0000 >I'm looking for a snippet of .sh type shell code that searches the >/usr/ports/INDEX-8 file for dependents. > >Just a pointer to a script in the ports system that has this would be >helpful Do you mean that, given port A, you want to find all ports that need port A in order to be fetched, extracted, patched, built or installed? Or do you want to find all ports that are needed to fetch, extract, patch, build or install port A? If the former, you could look at the parts of ports/Mk/bsd.port.mk that are used by running `make -C $PORTSDIR search bdeps= display=name,path`, and `make -C $PORTSDIR search rdeps= display=name,path`. If the latter, look at the parts of ports/Mk/bsd.port.mk that are used by running `make -C pretty-print-run-depends pretty-print-build-depends`. Also, parts of the ports-mgmt/portmaster script used with --index-only may have similar functionality. And do you mean to only use the INDEX? Or are you able to use parts of the port tree? Or the pkg_info utility? b.