From owner-svn-src-head@freebsd.org Mon Dec 4 17:25:57 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2F83AE5ED0D for ; Mon, 4 Dec 2017 17:25:57 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x232.google.com (mail-it0-x232.google.com [IPv6:2607:f8b0:4001:c0b::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E66307196F for ; Mon, 4 Dec 2017 17:25:56 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x232.google.com with SMTP id p139so14614945itb.1 for ; Mon, 04 Dec 2017 09:25:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=hmAC+sTGK2Ho02zF+d9NfERdgi3tE9f7FS58gWKeKWQ=; b=yBOd7d2d1wu67Z4WMS8z6mHiv4y2utAssfipdNhb7xtdhhCrRQj6ItGlnSbdeYCVeC 181xtMT6aV1czkuFWigaCHEGYf4kINy+uh/yv342wO+45C97fp2/hqawTKRWHK0nwJ7Q w0pcF0F6hLL9s10YbhybkOjoMR84zTe/mVRmRj1Y45bkhqtIpupkxSAHKjAY+99ILIAY itioo/4lG4Y2SGH71JF43sf0eFl934QvBJk6WcX/roIH9oTj5xeiLskWYCmH+iHDU+3a 6a6bnBsLgKxFPnNHKI0E3KPjjmJPq7o/S2O1kqWb+vX8wlm6SHupadHFFOW9yt2HPzh1 yFjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=hmAC+sTGK2Ho02zF+d9NfERdgi3tE9f7FS58gWKeKWQ=; b=D5LWGssf5BBVAmJLpcwWAMCMlCs16GoCOfF3/tIrvOTj8MiNHXKop2VWYnGepgbekW n11LHo2DCCG74s2BBQBEdmTQ+gMV+CqzMoCH0P/vMAm2BoXFkwb3X+hgp84tQ34RdBn/ WyZFRnjmkPBpsWyQqH/HlUOxgPxihyhxWjJt1hDhBWCVp9RBHXsMBHyrdUnRFL7M3sZ3 cjdiUMZpc81AsRd5fSn21AukVARtZCg0YBQlJuTZrd7nva1he1Mt9DzyxlftG4jozuHO BQyv6c/AiIcYO3e56ToQSNEkZyBJ0BxPMbfuFiD3JtqQAmkmtwrkntJSLzJMdzlYxqhM kH8w== X-Gm-Message-State: AKGB3mIp14pP3puqGarELR/YgC/CwwztlpXDWJIIrPCrhuyxSUcOTGbg 2PRNnG+M7qe/H1jXw/wLvdrujh3EqrkGpq1K0uWlAg== X-Google-Smtp-Source: AGs4zMag8i13J+lCRCkPeUZ4bFhiPKUgq5PehiAJEmDTQii5mUznic64kk9FstXa73RIyf0wgr2If2dbXnnBItkoWI4= X-Received: by 10.107.52.140 with SMTP id b134mr13164031ioa.291.1512408356163; Mon, 04 Dec 2017 09:25:56 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.108.204 with HTTP; Mon, 4 Dec 2017 09:25:55 -0800 (PST) X-Originating-IP: [50.253.109.65] In-Reply-To: <201712041714.vB4HEwpd046935@pdx.rh.CN85.dnsmgr.net> References: <201712041638.vB4GcK0q087528@repo.freebsd.org> <201712041714.vB4HEwpd046935@pdx.rh.CN85.dnsmgr.net> From: Warner Losh Date: Mon, 4 Dec 2017 10:25:55 -0700 X-Google-Sender-Auth: C6QAgrwqzzf9ZbPEh0L7iS2hf1w Message-ID: Subject: Re: svn commit: r326535 - head/tools/boot To: "Rodney W. Grimes" Cc: Warner Losh , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Dec 2017 17:25:57 -0000 On Mon, Dec 4, 2017 at 10:14 AM, Rodney W. Grimes < freebsd@pdx.rh.cn85.dnsmgr.net> wrote: > [ Charset UTF-8 unsupported, converting... ] > > Author: imp > > Date: Mon Dec 4 16:38:20 2017 > > New Revision: 326535 > > URL: https://svnweb.freebsd.org/changeset/base/326535 > > > > Log: > > Just use the last line of the output from getting .OBJDIR. The > > buildenv target prints other stuff too that needs to be ignored. > > > > Sponsored by: Netflix > > > > Modified: > > head/tools/boot/universe.sh > > > > Modified: head/tools/boot/universe.sh > > ============================================================ > ================== > > --- head/tools/boot/universe.sh Mon Dec 4 15:28:07 2017 > (r326534) > > +++ head/tools/boot/universe.sh Mon Dec 4 16:38:20 2017 > (r326535) > > @@ -26,7 +26,7 @@ dobuild() > > local opt=$3 > > > > echo -n "Building $ta ${opt} ... " > > - objdir=$(make buildenv TARGET_ARCH=$ta BUILDENV_SHELL="make -V > .OBJDIR") > > + objdir=$(make buildenv TARGET_ARCH=$ta BUILDENV_SHELL="make -V > .OBJDIR" | tail -1) > > rm -rf ${objdir} > > if ! make buildenv TARGET_ARCH=$ta BUILDENV_SHELL="make clean > cleandepend cleandir obj depend" \ > > > $lf 2>&1; then > > We should probably find a better way than this, > that is a very error prone mechanism to use. > > And given your gona run an rm -rf on the return value very dangerious > if wrong. > > > Something like adding a QUIET=true to buildenv so that it only outputs the > desired value? Or having buildenv have options to directly output your > desired .OBJDIR value? > This method works regardless of what noise is output, from none at all, to paragraphs of help. I'm content with the solution. This tool is primarily used by me for testing that changes to src/stand work on all the relevant environments. I'm OK with some fragility and sharp edges. While I wouldn't mind more knobs on the buildenv stuff, our current build system is somewhat overburdened with knobs so a new knob for a narrow use case isn't my first choice. I'd rather work around it in this case. I'd, of course, revisit this choice if there's other users that come forward. So far I think I'm the only one given the other bugs I had to fix in buildenv... Warner