diff options
author | Eric Wong <e@80x24.org> | 2023-09-10 02:05:32 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2023-09-10 10:03:27 +0000 |
commit | 4ecef5a235843bc0c17db5d6dba2de2f62066a1f (patch) | |
tree | 984fb47d63b67a70751c72ebad1e675b8ca2c2c4 /ci | |
parent | 7bbd02d85c0d155bfb30573746d0d28c9e57acf3 (diff) | |
download | public-inbox-4ecef5a235843bc0c17db5d6dba2de2f62066a1f.tar.gz |
This fixes the script under FreeBSD (tested 13.2) FreeBSD 13.2 has `13.2-RELEASE-p3' in its uname(2) utsname.release. While the `.2' component is a welcome addition over the old script, Perl parses the `-' as a subtraction operation, which isn't what we want.
Diffstat (limited to 'ci')
-rwxr-xr-x | ci/profiles.perl | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ci/profiles.perl b/ci/profiles.perl index 5b441790..720cd24e 100755 --- a/ci/profiles.perl +++ b/ci/profiles.perl @@ -49,9 +49,12 @@ $VERSION_ID //= 0; # numeric? could be 'sid', actually... my %MIN_VER = (freebsd => v11, openbsd => v7.3, netbsd => v9.3); if (defined(my $min_ver = $MIN_VER{$^O})) { - my $vstr = eval "v$VERSION_ID"; + my $vid = $VERSION_ID; + $vid =~ s/-.*\z//s; # no dashes in v-strings + my $vstr = eval "v$vid"; + die "can't convert VERSION_ID=$VERSION_ID to v-string" if $@; die <<EOM if $vstr lt $min_ver; -ID=$ID release=$release ($version) too old to support +ID=$ID VERSION_ID=$VERSION_ID release=$release ($version) too old to support EOM } my $PKG_FMT = do { |