From owner-svn-src-head@freebsd.org Fri Sep 27 20:56:45 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9ADAA12CCA8; Fri, 27 Sep 2019 20:56:45 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46g3xn2qDHz4K95; Fri, 27 Sep 2019 20:56:45 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 443881EAD4; Fri, 27 Sep 2019 20:56:45 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x8RKujYg006854; Fri, 27 Sep 2019 20:56:45 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x8RKujGY006853; Fri, 27 Sep 2019 20:56:45 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201909272056.x8RKujGY006853@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 27 Sep 2019 20:56:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352821 - head/tools/tools/nanobsd X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/tools/tools/nanobsd X-SVN-Commit-Revision: 352821 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 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: Fri, 27 Sep 2019 20:56:45 -0000 Author: imp Date: Fri Sep 27 20:56:44 2019 New Revision: 352821 URL: https://svnweb.freebsd.org/changeset/base/352821 Log: Push and pop xtrace correctly for run_early_customize run_early_customize is run as a shell list, not as a subshell, so that the side effects of setting variables can affect later stages of the build (for better or worse, it's been like this since it was introduced). It therefore has the side effect of turning off xtrace always, which limits the usefulness of sh -x nanobsd.sh. Remember the old setting and only turn off tracing after the command if tracing was off before. All the other places where we do similar things we use a subshell, so we don't need to do this. Modified: head/tools/tools/nanobsd/defaults.sh Modified: head/tools/tools/nanobsd/defaults.sh ============================================================================== --- head/tools/tools/nanobsd/defaults.sh Fri Sep 27 20:56:31 2019 (r352820) +++ head/tools/tools/nanobsd/defaults.sh Fri Sep 27 20:56:44 2019 (r352821) @@ -445,7 +445,11 @@ run_early_customize ( ) { pprint 2 "early customize \"$c\"" pprint 3 "log: ${NANO_LOG}/_.early_cust.$c" pprint 4 "`type $c`" - { set -x ; $c ; set +x ; } >${NANO_LOG}/_.early_cust.$c 2>&1 + { t=$(set -o | awk '$1 == "xtrace" && $2 == "off" { print "set +x"}'); + set -x ; + $c ; + eval $t + } >${NANO_LOG}/_.early_cust.$c 2>&1 done }