[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: m4_version_compare and new version numbering
From: |
Jim Meyering |
Subject: |
Re: m4_version_compare and new version numbering |
Date: |
Sat, 03 Nov 2007 18:06:12 +0100 |
Eric Blake <address@hidden> wrote:
> According to Ralf Wildenhues on 11/3/2007 10:28 AM:
>> * Jim Meyering wrote on Sat, Nov 03, 2007 at 08:45:43AM CET:
>>> An alternative is to change the format of the version string, like
>>> git does. s/-/./g. They also prepend an alpha ('g') to the SHA1 part.
>>
>> A small data point: I recall Debian disliking '-' in version strings at
>> one point in time, because they like to append their own package version
>> with one or more hyphens. Dunno how much that matters any more or at
>> all, or if other distros do similar.
>
> True, but since actual distribution tarballs exclude the SHA1 part, and
> git snapshots aren't really meant for distros, I see no conflict between
> distros that use '-' and undistributed snapshots that use '-'.
I've done as proposed to coreutils.
Anyone object to doing it to automake?
2007-11-03 Jim Meyering <address@hidden>
Change the first '-' to '.' in the snapshot version string,
e.g., 6.9-377-08144 -> 6.9.377-08144
* build-aux/git-version-gen: ... and add comments.
diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen
index c433c26..4e8ffc6 100755
--- a/build-aux/git-version-gen
+++ b/build-aux/git-version-gen
@@ -42,8 +42,9 @@ elif test -d .git \
*) (exit 1) ;;
esac
then
- # Remove the "g" in git-describe's output string.
- v=`echo "$v" | sed 's/\(.*\)-g/\1-/'`;
+ # Change the first '-' to a '.', so version-comparing tools work properly.
+ # Remove the "g" in git-describe's output string, to save a byte.
+ v=`echo "$v" | sed 's/-/./;s/\(.*\)-g/\1-/'`;
else
v=UNKNOWN
fi
--
1.5.3.5.529.ge3d6d
- Re: m4_version_compare and new version numbering, (continued)
- Re: m4_version_compare and new version numbering, Jim Meyering, 2007/11/03
- Re: m4_version_compare and new version numbering, Benoit SIGOURE, 2007/11/03
- Re: m4_version_compare and new version numbering, Jim Meyering, 2007/11/03
- Re: m4_version_compare and new version numbering, Andreas Schwab, 2007/11/03
- Re: m4_version_compare and new version numbering, Jim Meyering, 2007/11/03
- Re: m4_version_compare and new version numbering, Andreas Schwab, 2007/11/03
- Re: m4_version_compare and new version numbering, Eric Blake, 2007/11/03
- Re: m4_version_compare and new version numbering, Jim Meyering, 2007/11/03
- Re: m4_version_compare and new version numbering, Ralf Wildenhues, 2007/11/03
- Re: m4_version_compare and new version numbering, Eric Blake, 2007/11/03
- Re: m4_version_compare and new version numbering,
Jim Meyering <=
- Re: m4_version_compare and new version numbering, Ralf Wildenhues, 2007/11/03
- Re: m4_version_compare and new version numbering, Jim Meyering, 2007/11/03
- Re: m4_version_compare and new version numbering, Paul Eggert, 2007/11/03
- Re: m4_version_compare and new version numbering, Andreas Schwab, 2007/11/03
- Re: m4_version_compare and new version numbering [was: distcheck fails with autotest...], Eric Blake, 2007/11/03
- Re: distcheck fails with autotest: autom4te: cannot open ../../tests/testsuite.tmp: Permission denied, Ralf Wildenhues, 2007/11/03
- Re: distcheck fails with autotest: autom4te: cannot open ../../tests/testsuite.tmp: Permission denied, Jim Meyering, 2007/11/03
- Re: distcheck fails with autotest: autom4te: cannot open ../../tests/testsuite.tmp: Permission denied, Eric Blake, 2007/11/03
- Re: distcheck fails with autotest: autom4te: cannot open ../../tests/testsuite.tmp: Permission denied, Benoit SIGOURE, 2007/11/02
- Re: distcheck fails with autotest: autom4te: cannot open ../../tests/testsuite.tmp: Permission denied, Jim Meyering, 2007/11/02