From owner-freebsd-ports@FreeBSD.ORG Fri Aug 21 04:23:09 2009 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 E1E49106568F for ; Fri, 21 Aug 2009 04:23:09 +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 ESMTP id 90B4C8FC68 for ; Fri, 21 Aug 2009 04:23:09 +0000 (UTC) Received: (qmail 26159 invoked by uid 399); 21 Aug 2009 04:23:03 -0000 Received: from localhost (HELO foreign.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 21 Aug 2009 04:23:03 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4A8E2121.6040507@FreeBSD.org> Date: Thu, 20 Aug 2009 21:22:57 -0700 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 2.0.0.22 (X11/20090729) MIME-Version: 1.0 To: Miroslav Lachman <000.fbsd@quip.cz> References: <4A89CB20.3000408@quip.cz> In-Reply-To: <4A89CB20.3000408@quip.cz> X-Enigmail-Version: 0.95.7 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-ports@freebsd.org Subject: Re: portmaster is not always recursive 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, 21 Aug 2009 04:23:10 -0000 Woo hoo! I found the bug, and fixed it in the just-committed version 2.10. The bug was in the NO_DEP_UPDATES flag which is one of the oldest features of portmaster. It operates in the first pass through the dependencies (aka config mode) and if all of the dependent ports are up to date it allows the second pass (build mode) to skip the dependency check(s) altogether. When I first added this feature (prior to the use of variables to store information on up to date ports/dependencies) this was a great time saver. It's not that important anymore given that dependency checks are so much faster, but it still helps some (especially if you are building/installing a lot of ports) and it has been overloaded a bit for other purposes. Unfortunately it didn't quite keep up with the times when some code paths were added (such as -r and the new code to do multiple ports on the same command line) and it was not always being unset when it should have been. The more common code paths (one port on the command line, or -a) didn't have this problem, which along with the fact that it only happened with certain combinations of out of date dependencies is why the bug went undiagnosed for so long. Ironically the flag was also being UNset at times when it should not have been (for similar, although somewhat different reasons) so in cases where you are building a list of ports (like multiple ports on the command line or -r) and all of the dependencies are up to date there will be a slight performance improvement. This side of the bug would never have been noticed by users since it only resulted in some unnecessary dependency checking. FWIW there is one more small performance improvement in 2.10 for building multiple ports on the command line, although the percentage of performance increase is probably quite small. Thanks Miroslav for providing all of the information you did which was a big help in allowing me to narrow down where the bug was _not_ which ultimately allowed me to find out where it was. :) Doug -- This .signature sanitized for your protection