From owner-freebsd-questions@FreeBSD.ORG Sat Mar 8 22:42:23 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 10DD7FDF for ; Sat, 8 Mar 2014 22:42:23 +0000 (UTC) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9E56A267 for ; Sat, 8 Mar 2014 22:42:22 +0000 (UTC) Received: from nb981.math (p57AEE931.dip0.t-ipconnect.de [87.174.233.49]) by mrelayeu.kundenserver.de (node=mreue005) with ESMTP (Nemesis) id 0M5Ksl-1X6nEp31ax-00zZ7E; Sat, 08 Mar 2014 23:42:12 +0100 Message-ID: <531B9CC4.9050205@janh.de> Date: Sat, 08 Mar 2014 23:42:12 +0100 From: Jan Henrik Sylvester User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: Matthew Seaman , Andrea Venturoli Subject: Re: pkg equivalent of "pkg_info -R" References: <53186ABC.5060601@netfence.it> <20140306184030.078a99cedac859b5c5b83e22@embarqmail.com> <53196D17.8000300@FreeBSD.org> In-Reply-To: <53196D17.8000300@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:lNz4bMOOwZj4TycBmp2P/H6KCNccntyxvUa1pOQu5Ve xEWg5T487JOQRn9zSJBy1Vvd7DGnxhIqDyiVh7Gc0UeSfUNxGd 8ub8SHoSBGSHMtLteEpAUl+4ADqGuee0ZMBYNhlAcFb6fD7eAN WzK7R3STFB97xAwOPvPxgDFYYZnSggufbPWu84SiW74j/4b0Vm E2D4oeWKx7nvb2bEEJqBGxXV2vduyWBiFl4rJzRdAEEW+KZDeh /BnrX97KKrlW+TY/76QC3iP2vwNz95L7SGniZWO1bJGhxLidIN RvnG8wGEmT7bt32uuCYAHNyFKBjblnPnB43FUE2x2pwRwLlxQ= = Cc: questions-list freebsd X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Mar 2014 22:42:23 -0000 On 03/07/2014 07:54, Matthew Seaman wrote: > Yes, being able to generate the entire dependency tree would be a > desirable option. It's not particularly difficult, but it does require > implementing recursive behaviour for such lookups. That just needs > someone to step up and code it... > > Until then, you'ld have to write a shell wrapper around pkg query to > achieve the same effect. For reverse dependencies, you can abuse pkg delete: pkg delete -Rn gnutls | grep '^[[:blank:]]' (From the manpage, I would have thought that the q option would suppress the first and last line, but it does not.) This has the same result as the shell script posted in this thread aside from containing gnutls itself, but on the positive side, it is a factor of 100 faster on my machine. This seems to work under normal conditions. Unfortunately, a few days ago I had a cyclic dependency (x264<->ffmpeg), in which case "pkg delete -R" would error and not find all reverse dependencies. Anyhow, this should never happen and you probably want the error message in that case. If it was only as easy as this for dependencies (not reverse). Cheers, Jan Henrik