-
-
Notifications
You must be signed in to change notification settings - Fork 320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
packaging: Use GRASS version for non-git builds #2636
Conversation
Value is used in version check which fails when the value changes. Fixes: OSGeo#2610
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assuming a release when not using Git sounds good to me.
When # get git short hash + date of last change in GRASS headers
# (and anything else in include)
GRASS_HEADERS_GIT_HASH="${GRASS_VERSION_NUMBER}"
GRASS_HEADERS_GIT_DATE=`date -u +%FT%T%z | sed 's/\(..\)$/:\1/'`
AC_PATH_PROG(GIT, git, no)
if test "$GIT" != "no" ; then
GRASS_VERSION_GIT=`$GIT rev-parse --short HEAD 2>/dev/null`
if test -z "$GRASS_VERSION_GIT"; then
GRASS_VERSION_GIT="exported"
fi
GRASS_HEADERS_GIT_HASH=`$GIT log -1 --pretty=format:"%h" -- "${SRCDIR}/include" 2>/dev/null`
if test -z "$GRASS_HEADERS_GIT_HASH"; then
GRASS_HEADERS_GIT_HASH=`date -u +%FT%T%z | sed 's/\(..\)$/:\1/'`
fi
GRASS_HEADERS_GIT_DATE=`date -d $($GIT log -1 --pretty=format:"%cI" -- "${SRCDIR}/include") -u +%FT%T%z | sed 's/\(..\)$/:\1/'` 2>/dev/null
if test -z "$GRASS_HEADERS_GIT_DATE"; then
GRASS_HEADERS_GIT_DATE=`date -u +%FT%T%z | sed 's/\(..\)$/:\1/'`
fi
fi |
You need to run |
Generated files should not be committed. |
The generated file has been there in 20 years, since version 5. As long as it is there, the two should be in sync, no? |
If Lines 144 to 158 in 5184a91
Now, the question is whether L152 should change to:
too, as a fallback if test on L150 fails? |
Since there is no |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
@wenzeslaus Please go ahead and merge if you still approve after latest changes.
@sebastic Thanks !
As reported in OSGeo#2610, rebuilding the GRASS sources (from the release tarballs) with no changes break the gdal-grass plugins because the `GIS_H_VERSION` value changes. Non-git builds use the current timestamp in `GRASS_HEADERS_GIT_HASH` which is also used for `GRASS_HEADERS_DATE`. This PR uses `GRASS_VERSION_NUMBER` for `GRASS_HEADERS_GIT_HASH` as a better value for non-git builds, that value won't change for simple rebuilds of the source tree.
As reported in OSGeo#2610, rebuilding the GRASS sources (from the release tarballs) with no changes break the gdal-grass plugins because the `GIS_H_VERSION` value changes. Non-git builds use the current timestamp in `GRASS_HEADERS_GIT_HASH` which is also used for `GRASS_HEADERS_DATE`. This PR uses `GRASS_VERSION_NUMBER` for `GRASS_HEADERS_GIT_HASH` as a better value for non-git builds, that value won't change for simple rebuilds of the source tree.
As reported in OSGeo#2610, rebuilding the GRASS sources (from the release tarballs) with no changes break the gdal-grass plugins because the `GIS_H_VERSION` value changes. Non-git builds use the current timestamp in `GRASS_HEADERS_GIT_HASH` which is also used for `GRASS_HEADERS_DATE`. This PR uses `GRASS_VERSION_NUMBER` for `GRASS_HEADERS_GIT_HASH` as a better value for non-git builds, that value won't change for simple rebuilds of the source tree.
As reported in OSGeo#2610, rebuilding the GRASS sources (from the release tarballs) with no changes break the gdal-grass plugins because the `GIS_H_VERSION` value changes. Non-git builds use the current timestamp in `GRASS_HEADERS_GIT_HASH` which is also used for `GRASS_HEADERS_DATE`. This PR uses `GRASS_VERSION_NUMBER` for `GRASS_HEADERS_GIT_HASH` as a better value for non-git builds, that value won't change for simple rebuilds of the source tree.
As reported in #2610, rebuilding the GRASS sources (from the release tarballs) with no changes break the gdal-grass plugins because the
GIS_H_VERSION
value changes.Non-git builds use the current timestamp in
GRASS_HEADERS_GIT_HASH
which is also used forGRASS_HEADERS_DATE
.This PR uses
GRASS_VERSION_NUMBER
forGRASS_HEADERS_GIT_HASH
as a better value for non-git builds, that value won't change for simple rebuilds of the source tree.