From owner-freebsd-ports@FreeBSD.ORG Fri Jul 6 23:58:41 2007 Return-Path: X-Original-To: freebsd-ports@FreeBSD.org Delivered-To: freebsd-ports@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E49CB16A469 for ; Fri, 6 Jul 2007 23:58:41 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with SMTP id 9F5AA13C480 for ; Fri, 6 Jul 2007 23:58:41 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: (qmail 6433 invoked by uid 399); 6 Jul 2007 23:58:40 -0000 Received: from localhost (HELO ?192.168.0.6?) (dougb@dougbarton.us@127.0.0.1) by localhost with SMTP; 6 Jul 2007 23:58:40 -0000 X-Originating-IP: 127.0.0.1 Message-ID: <468ED728.1020209@FreeBSD.org> Date: Fri, 06 Jul 2007 16:58:32 -0700 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 2.0.0.4 (Windows/20070604) MIME-Version: 1.0 To: Jeremie Le Hen References: <20070614070602.GD39533@obiwan.tataz.chchile.org> In-Reply-To: <20070614070602.GD39533@obiwan.tataz.chchile.org> X-Enigmail-Version: 0.95.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-ports@FreeBSD.org Subject: Re: Keeping track of automatically installed dependency-only ports 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: Fri, 06 Jul 2007 23:58:42 -0000 Jeremie Le Hen wrote: > Hi, > > Is there a way to track dependency-only ports, so that if I install > port0 which requires port1 which in turn requires port2 and so on, > deinstalling port0 will deinstall portN up to the first one required by > another port or one I explicitely installed. I realize that this is an old post, but the thread it generated indicated that there is demand for this kind of functionality, and no solutions were presented that I could see. Portmaster actually has what I believe you are looking for. The -e option will "expunge" an installed port (pkg_delete + option to remove distfiles) and it will then call the -s option recursively to remove any "stale" ports that were previously installed as a dependency, but are no longer depended on. The -s mode prompts the user before deleting a port, and offers an option to remove the empty +REQUIRED_BY file which is the hallmark of a port that was once a dependency, but is no longer. Finally, portmaster has a -l option to "list" your installed ports according to categories based on whether they do/don't have dependencies, and whether they are/aren't depended on. This will give you a good view of ports that you're not using any more that could be safely deleted from the "root" and "leaf" categories. I should also point out that because portmaster uses (and modifies) only the existing data in the /var/db/pkg directory, all of these features are available whether you use portmaster to keep your ports up to date or not. hope this helps, Doug -- This .signature sanitized for your protection