From owner-freebsd-ports@FreeBSD.ORG Mon Aug 1 08:51:39 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 1BF141065672 for ; Mon, 1 Aug 2011 08:51:39 +0000 (UTC) (envelope-from talon@lpthe.jussieu.fr) Received: from shiva.jussieu.fr (shiva.jussieu.fr [134.157.0.129]) by mx1.freebsd.org (Postfix) with ESMTP id B0D6F8FC19 for ; Mon, 1 Aug 2011 08:51:38 +0000 (UTC) Received: from parthe.lpthe.jussieu.fr (parthe.lpthe.jussieu.fr [134.157.10.1]) by shiva.jussieu.fr (8.14.4/jtpda-5.4) with ESMTP id p718owdk069442 ; Mon, 1 Aug 2011 10:50:59 +0200 (CEST) X-Ids: 164 Received: from niobe.lpthe.jussieu.fr (niobe.lpthe.jussieu.fr [134.157.10.41]) by parthe.lpthe.jussieu.fr (Postfix) with ESMTP id BFFB520488; Mon, 1 Aug 2011 10:51:35 +0200 (CEST) Received: by niobe.lpthe.jussieu.fr (Postfix, from userid 2005) id AAA6243C5; Mon, 1 Aug 2011 10:51:35 +0200 (CEST) Date: Mon, 1 Aug 2011 10:51:35 +0200 From: Michel Talon To: Doug Barton , freebsd-ports@FreeBSD.org Message-ID: <20110801085135.GA45113@lpthe.jussieu.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i X-Miltered: at jchkmail.jussieu.fr with ID 4E366918.005 by Joe's j-chkmail (http : // j-chkmail dot ensmp dot fr)! X-j-chkmail-Enveloppe: 4E366918.005/134.157.10.1/parthe.lpthe.jussieu.fr/parthe.lpthe.jussieu.fr/ Cc: Subject: Re: UPDATING 20110730 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: Mon, 01 Aug 2011 08:51:39 -0000 Doug wrote: > Unfortunately the only way to improve on this would be to not do the > checks on a port-by-port basis, and do them all together at the end. > While that sounds appealing, it would dramatically increase the code > complexity, and also dramatically increase the chances of leaving the > pkg files in an inconsistent state if the process gets interrupted. I > don't like either one of those options. In here i have a program which checks the +REQUIRED_BY files and fixes the origins in +CONTENTS http://www.lpthe.jussieu.fr/~talon/check_pkg.py proceeding globally as you describe above. It would not make a big difference to completely fix the +CONTENTS. On an old machine with around +1000 ports installed it takes of the order of 10-30 seconds to run. Of course this is very fast because it uses the information in the INDEX file. If one accepts to download the INDEX (like portupgrade does) this is no problem. If one wants to rebuild the index from the ports, it takes time, but one can build a partial index for the installed ports (and dependencies). This is done in http://www.lpthe.jussieu.fr/~talon/pkgupgrade and takes someting like 1-2mn on the same machine. So there are ways to speed up the bookeeping done by programs like portupgrade, portmaster, but, as you are saying, doing this job between *each* port upgrade is far more time consuming. Of course the complexity is also increased, perhaps shell scripting is not the good tool to do that i don't know. Moreover i am not convinced that continually forking tons of programs can be very fast, and it would be nice to be able to exploit parallelism on modern multiproc machines. -- Michel TALON