From owner-freebsd-ports@FreeBSD.ORG Tue Jul 12 23:15:07 2011 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 5F462106566B for ; Tue, 12 Jul 2011 23:15:07 +0000 (UTC) (envelope-from tobez@tobez.org) Received: from heechee.tobez.org (heechee.tobez.org [194.255.56.42]) by mx1.freebsd.org (Postfix) with ESMTP id 2353D8FC13 for ; Tue, 12 Jul 2011 23:15:06 +0000 (UTC) Received: by heechee.tobez.org (Postfix, from userid 1001) id 5E5196D400; Wed, 13 Jul 2011 00:56:15 +0200 (CEST) Date: Wed, 13 Jul 2011 00:56:15 +0200 From: Anton Berezin To: freebsd-ports@FreeBSD.org Message-ID: <20110712225615.GA91283@heechee.tobez.org> Mail-Followup-To: Anton Berezin , freebsd-ports@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Powered-By: FreeBSD http://www.freebsd.org/ User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Subject: find-packages-using-libs: request for feedback 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: Tue, 12 Jul 2011 23:15:07 -0000 Hi, After the recent icu and libgcrypt updates I decided to try and find a way to avoid rebuilding everything which depends on a particular port when its shared library version is bumped. Previously I was profitably using sysutils/libchk, producing in the end the list of packages which *have* to be rebuilt. Its use, however, requires some substantial massaging of the output it produces. So I wrote a little tool which automates such tasks. As a side effect, it can also be used to simply list all packages using a shared library (or libraries). Fetch it at https://github.com/tobez/find-packages-using-libs . Usage examples: Finding every installed package using libgcrypt: ./find-packages-using-libs libgcrypt.so\* Finding every installed package using libgcrypt OR libicu*: ./find-packages-using-libs libgcrypt.so\* libicu* Finding every installed package which uses libraries that do not exist (or exist in non-standard paths without any RPATH): ./find-packages-using-libs -b Finding every installed package which uses a non-existing libgcrypt: ./find-packages-using-libs -b libgcrypt.so\* There are a couple of minor options as well, but for now, this about covers it. I am interested in you feedback: - would you use it? does it solve a problem for you, or do you foresee it will solve a problem for you in the future? - does it work for you? any bugs? - any wishes with regard to missing features? Most of the package-walking code shamelessly (for a good reason) stolen from the perl-after-upgrade script. The code is in public domain. Cheers, \Anton. -- Our society can survive even a large amount of irrational regulation. -- John McCarthy