[Jean Delvare]
> Good catch, my test was broken. However yours isn't perfect either,
> for example it would fail to warn on version 0.35. Although such a
> version probably never existed, I'd prefer the test to be accurate so
> that future changes (when quilt starts requiring even newer versions
> of diffstat) won't break. Wouldn't the proper test be:
> major -lt 1 -o \( major -eq 1 -a minor -lt 32 \)
> ?
Here comes an updated version of the patch, fixing the test bug Martin
spotted, and against quilt CVS this time.
Thanks,
--
Jean Delvare
Index: configure.ac
===================================================================
RCS file: /cvsroot/quilt/quilt/configure.ac,v
retrieving revision 1.35
diff -u -r1.35 configure.ac
--- configure.ac 29 Apr 2005 07:35:01 -0000 1.35
+++ configure.ac 24 May 2005 19:43:19 -0000
@@ -200,6 +200,31 @@
using the '--with-diffstat' option.
])
DIFFSTAT="diffstat"
+else
+ # We need diffstat version 1.32 or better, else quilt refresh --diffstat
+ # will show progress data we don't want to see. This is only a warning
+ # and we continue even if version is older, as this is only a minor
annoyance.
+ AC_MSG_CHECKING([for diffstat version])
+ diffstat_major_version=`$DIFFSTAT -V 2>/dev/null | \
+ sed 's/^[[^0-9]]*\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
+ diffstat_minor_version=`$DIFFSTAT -V 2>/dev/null | \
+ sed 's/^[[^0-9]]*\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
+ if test -z "$diffstat_major_version" -o -z "$diffstat_minor_version"; then
+ AC_MSG_RESULT(unknown)
+ AC_MSG_WARN([
+diffstat utility version couldn't be checked; chances are good that the
+--diffstat option of the refresh and diff commands will not work properly.
+])
+ else
+ AC_MSG_RESULT($diffstat_major_version.$diffstat_minor_version)
+ if test "$diffstat_major_version" -lt 1 \
+ -o \( "$diffstat_major_version" -eq 1 -a "$diffstat_minor_version"
-lt 32 \); then
+ AC_MSG_WARN([
+diffstat utility is too old; the --diffstat option of the refresh command
+will not work correctly until a newer version (>= 1.32) is installed.
+])
+ fi
+ fi
fi
dnl Check for sendmail
_______________________________________________
Quilt-dev mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/quilt-dev