From owner-freebsd-current@FreeBSD.ORG Sun Aug 22 17:36:24 2010 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 035741065670; Sun, 22 Aug 2010 17:36:24 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from adsum.doit.wisc.edu (adsum.doit.wisc.edu [144.92.197.210]) by mx1.freebsd.org (Postfix) with ESMTP id C56D28FC15; Sun, 22 Aug 2010 17:36:23 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 8BIT Content-type: text/plain; charset=UTF-8; format=flowed Received: from avs-daemon.smtpauth1.wiscmail.wisc.edu by smtpauth1.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) id <0L7K00H00E8NYC00@smtpauth1.wiscmail.wisc.edu>; Sun, 22 Aug 2010 12:36:23 -0500 (CDT) Received: from comporellon.tachypleus.net ([unknown] [76.210.62.197]) by smtpauth1.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) with ESMTPSA id <0L7K003VKE8KLG40@smtpauth1.wiscmail.wisc.edu>; Sun, 22 Aug 2010 12:36:22 -0500 (CDT) Date: Sun, 22 Aug 2010 12:36:20 -0500 From: Nathan Whitehorn In-reply-to: <86bp8ukfuf.fsf@ds4.des.no> To: =?UTF-8?B?RGFnLUVybGluZyBTbcO4cmdyYXY=?= Message-id: <4C716014.7050400@freebsd.org> X-Spam-Report: AuthenticatedSender=yes, SenderIP=76.210.62.197 X-Spam-PmxInfo: Server=avs-12, Version=5.6.0.2009776, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2010.8.22.172414, SenderIP=76.210.62.197 References: <201008190304.o7J34Wa4089466@freebsd-current.sentex.ca> <86occzdmhg.fsf@ds4.des.no> <4C6D557E.6080406@freebsd.org> <86sk29ws6u.fsf@ds4.des.no> <4C6E825C.5060509@freebsd.org> <86fwy9f5vj.fsf@ds4.des.no> <4C6F0813.9030007@freebsd.org> <86aaofpr7j.fsf@ds4.des.no> <4C704CD2.9040604@freebsd.org> <86bp8ukfuf.fsf@ds4.des.no> User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.11) Gecko/20100729 Thunderbird/3.0.6 Cc: powerpc@freebsd.org, FreeBSD Tinderbox , current@freebsd.org Subject: Re: [head tinderbox] failure on powerpc64/powerpc X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Aug 2010 17:36:24 -0000 On 08/22/10 07:10, Dag-Erling Smørgrav wrote: > Nathan Whitehorn writes: > >> Dag-Erling Smørgrav writes: >> >>> I'm not sure I understand what you mean (or rather, how it would >>> help the tinderbox). What *would* help would be an easy way to >>> determine, *before* trying to build it, whether a specific kernel >>> config is appropriate for a specific target. Can you think of an >>> easier way to do this than to scan the config for the "machine" >>> line? >>> >> That's exactly what I proposed. You use config, before trying the >> build, to look up the machine specification for the config file. I >> sent you a 5 line patch to tinderbox.pl that does this by private >> email. >> > Here's a solution that works regadless of config(8) version, though I'm > not sure it qualifies as either easy or clean: > > Index: tinderbox.pl > =================================================================== > RCS file: /home/projcvs/projects/tinderbox/tinderbox.pl,v > retrieving revision 1.68 > diff -u -r1.68 tinderbox.pl > --- tinderbox.pl 25 Aug 2009 17:28:14 -0000 1.68 > +++ tinderbox.pl 22 Aug 2010 12:08:46 -0000 > @@ -722,10 +722,29 @@ > } > > # Build additional kernels > + kernel: > foreach my $kernel (sort(keys(%kernels))) { > if (! -f "$srcdir/sys/$machine/conf/$kernel") { > warning("no kernel config for $kernel"); > - next; > + next kernel; > + } > + # Hack: check that the config is appropriate for this target. > + # If no "machine" declaration is present, assume that it is. > + local *KERNCONF; > + if (open(KERNCONF, "<", "$srcdir/sys/$machine/conf/$kernel")) { > + while () { > + next unless m/^machine\s+(\w+(?:\s+\w+)?)\s*(?:\#.*)?$/; > + if ($1 !~ m/^\Q$machine\E(\s+\Q$arch\E)?$/) { > + warning("skipping $kernel"); > + close(KERNCONF); > + next kernel; > + } > + last; > + } > + close(KERNCONF); > + } else { > + warning("$kernel: $!"); > + next kernel; > } > logstage("building $kernel kernel"); > logenv(); > > It will break if the "machine" declaration ever moves into an included > file, since it does not follow include statements, but it will do for > now. > Thanks! I think we are pretty likely to stay in the situation where this hack works for the foreseeable future. -Nathan