Opened 6 years ago
Closed 6 years ago
#917 closed defect (fixed)
configure sed version_release stripper broken under NetBSD
Reported by: | robe | Owned by: | robe |
---|---|---|---|
Priority: | major | Milestone: | 3.7.0 |
Component: | Build/Install | Version: | main |
Severity: | Unassigned | Keywords: | |
Cc: |
Description
From Greg Troxel https://lists.osgeo.org/pipermail/geos-devel/2018-August/008451.html
But, I figured out what was wrong. This is the version from configure (so no extra [ - don't paste it in...). The key thing is to add () around .* before the ?, because .*? is malformed. It's the .* production that the ? applies to (present or not). VERSION_RELEASE=`echo "$VERSION" | sed -E 's/^([0-9]+\.[0-9]+\.[0-9]+)(.*)?$/\1/'` GNU sed may be allowing this as an extension, because "*?" doesn't make sense, since * is repetition. Actually, the whole ? is redundant and can be just dropped, because (.*)? matches zero or more occurrences fo any character, and also the empty string. But .* matches the empty string anyway. So while I can see the point that it leads the reader to think "either some arbitrary string or the empty string", it's just more complicated for no good reason. So just drop the ? after the .*
Change History (3)
Note:
See TracTickets
for help on using tickets.
Patching
configure.ac
as suggested by Greg should be fine, i.e.:It handles cases like
3.7.0rc1dev
just fine on Linux too.