Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Jun 2009 15:31:40 +0000 (UTC)
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r194492 - in stable/7/sys: . conf contrib/pf
Message-ID:  <200906191531.n5JFVe2K047228@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bz
Date: Fri Jun 19 15:31:40 2009
New Revision: 194492
URL: http://svn.freebsd.org/changeset/base/194492

Log:
  MFC: r187413,187486,190514
  
    Reduce the impact of svnversion.  Just scan the src/sys tree,
    not all of src.
  
    Initially done by peter in 183528, backed out in 183566 due to
    problems with newvers.sh also called from other places during
    world build.  Those two commits were not MFCed.
  
    A working solution was put back in in the MFCed r190514.
  
    Also strip the machine arch from SRCDIR in case it is a cross
    build so svnversion works, done by thompsa r187413,187486.

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/conf/newvers.sh
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/conf/newvers.sh
==============================================================================
--- stable/7/sys/conf/newvers.sh	Fri Jun 19 13:08:49 2009	(r194491)
+++ stable/7/sys/conf/newvers.sh	Fri Jun 19 15:31:40 2009	(r194492)
@@ -91,13 +91,22 @@ for dir in /bin /usr/bin /usr/local/bin;
 	if [ -x "${dir}/svnversion" ]; then
 		svnversion=${dir}/svnversion
 		SRCDIR=${d##*obj}
+		if [ -n "$MACHINE" ]; then
+			SRCDIR=${SRCDIR##/$MACHINE}
+		fi
 		SRCDIR=${SRCDIR%%/sys/*}
 		break
 	fi
 done
 
 if [ -n "$svnversion" -a -d "${SRCDIR}/.svn" ] ; then
-	svn=" r`cd $SRCDIR && $svnversion`"
+	# If we are called from the kernel build, limit
+	# the scope of svnversion to sys/ .
+	if [ -e "${SRCDIR}/sys/conf/newvers.sh" ] ; then
+		svn=" r`cd $SRCDIR/sys && $svnversion`"
+	else
+		svn=" r`cd $SRCDIR && $svnversion`"
+	fi
 else
 	svn=""
 fi



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906191531.n5JFVe2K047228>