Date: Sat, 19 Nov 2011 01:05:13 +0100 From: Maciej Milewski <milu@dat.pl> To: Doug Barton <dougb@FreeBSD.org>, freebsd-current@freebsd.org Subject: sys/conf/newvers.sh broken for work with git Message-ID: <4EC6F2B9.70107@dat.pl>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
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.
[-- Attachment #2 --]
--- 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4EC6F2B9.70107>
