Hi,
I encountered newvers.sh issue while working locally with git tree.
The last patch broke correct versioning. The issue is the "break" after checking the svnversion cmd. I use git for local work and have svnversion cmd too. So the first check is true and break makes exit from further processing for loop. This way there is no check if git is in path.

Quick hack would be changing the order of this "if" to first check if there is .git dir and git cmd and then go further to check svnversion.
This solution might be not perfect but atleast is working for me.

Greetings,
Maciek

Quick patch is attached.
--- sys/conf/newvers.sh 2011-11-19 00:56:50.795815738 +0100
+++ sys/conf/newvers-patched.sh 2011-11-19 00:58:21.187818982 +0100
@@ -88,14 +88,14 @@
 i=`${MAKE:-make} -V KERN_IDENT`
 
 for dir in /bin /usr/bin /usr/local/bin; do
-       if [ -x "${dir}/svnversion" ] ; then
-               svnversion=${dir}/svnversion
-               break
-       fi
        if [ -d "${SYSDIR}/../.git" -a -x "${dir}/git" ] ; then
                git_cmd="${dir}/git --git-dir=${SYSDIR}/../.git"
                break
        fi
+       if [ -x "${dir}/svnversion" ] ; then
+               svnversion=${dir}/svnversion
+               break
+       fi
 done
 
 if [ -n "$svnversion" ] ; then
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Reply via email to