Date: Fri, 31 May 2019 22:57:20 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348486 - head/sys/conf Message-ID: <201905312257.x4VMvKfm030127@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: imp Date: Fri May 31 22:57:20 2019 New Revision: 348486 URL: https://svnweb.freebsd.org/changeset/base/348486 Log: Defer evaluation of modified until after it's set With the reorg r348175, we now look at modified before it is set. Rearrange things so that we can set include_metadata to either yes, no or if-modified. This should fix the -R flag that was broken in r348175, which broke WITH_REPRODUCIBLE_BUILD for kernels. Feedback From: emaste@ Differential Revision: https://reviews.freebsd.org/D20480 Modified: head/sys/conf/newvers.sh Modified: head/sys/conf/newvers.sh ============================================================================== --- head/sys/conf/newvers.sh Fri May 31 21:22:58 2019 (r348485) +++ head/sys/conf/newvers.sh Fri May 31 22:57:20 2019 (r348486) @@ -96,7 +96,10 @@ fi COPYRIGHT="$COPYRIGHT " -include_metadata=true +# We expand include_metadata later since we may set it to the +# future value of modified. +include_metadata=yes +modified=no while getopts crRvV: opt; do case "$opt" in c) @@ -104,12 +107,10 @@ while getopts crRvV: opt; do exit 0 ;; r) - include_metadata= + include_metadata=no ;; R) - if [ -z "${modified}" ]; then - include_metadata= - fi + include_metadata=if-modified ;; v) # Only put variables that are single lines here. @@ -253,7 +254,7 @@ if [ -n "$svnversion" ] ; then case "$svn" in [0-9]*[MSP]|*:*) svn=" r${svn}" - modified=true + modified=yes ;; [0-9]*) svn=" r${svn}" @@ -296,7 +297,7 @@ if [ -n "$git_cmd" ] ; then fi if git_tree_modified; then git="${git}-dirty" - modified=true + modified=yes fi fi @@ -312,7 +313,8 @@ if [ -n "$hg_cmd" ] ; then fi fi -if [ -z "${include_metadata}" ]; then +[ ${include_metadata} = "if-modified" -a ${modified} = "yes" ] && include_metadata=yes +if [ ${include_metadata} != "yes" ]; then VERINFO="${VERSION}${svn}${git}${hg} ${i}" VERSTR="${VERINFO}\\n" else
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905312257.x4VMvKfm030127>