From: Patrick Steinhardt <ps@pks.im>
To: Peter Oliver <p.d.oliver@mavit.org.uk>
Cc: git@vger.kernel.org, Peter Oliver <git@mavit.org.uk>
Subject: Re: [PATCH v2 2/2] meson: fix Perl version check for Meson versions before 1.7.0
Date: Mon, 27 Jan 2025 08:39:39 +0100 [thread overview]
Message-ID: <Z5c4OzzHWOo30Hu6@pks.im> (raw)
In-Reply-To: <20250124163049.23965-3-git@mavit.org.uk>
On Fri, Jan 24, 2025 at 04:30:49PM +0000, Peter Oliver wrote:
> diff --git a/meson.build b/meson.build
> index f01d81b39f..80af578d36 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -755,7 +755,11 @@ endif
>
> # Note that we only set NO_PERL if the Perl features were disabled by the user.
> # It may not be set when we have found Perl, but only use it to run tests.
> -perl = find_program('perl', version: '>=5.26.0', dirs: program_path, required: perl_required)
> +if meson.version().version_compare('>=1.5.0')
> + perl = find_program('perl', dirs: program_path, required: perl_required, version: '>=5.26.0', version_argument: '-V:version')
> +else
> + perl = find_program('perl', dirs: program_path, required: perl_required, version: '>=26')
I'm still a bit sceptical whether we should adapt this second line to
match against `>=26`. I guess as long as it doesn't break anything out
there it's okayish, and if we do see breakage we can in the worst case
revert it.
In any case, it deserves a comment why we're matching against the minor
version and not the whole version. E.g. something like this:
# Executing `perl --version` results in a string similar to the
# following output:
#
# This is perl 5, version 40, subversion 0 (v5.40.0) built for x86_64-linux-thread-multi
#
# Meson picks up the "40" as version number instead of using "v5.40.0"
# due to the regular expression it uses. This got fixed in Meson 1.7.0,
# but meanwhile we have to either use `-V:version` instead of `--version`,
# which we can do starting with Meson 1.5.0 and newer, or we have to
# match against the minor version.
Thanks!
Patrick
next prev parent reply other threads:[~2025-01-27 7:39 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-20 16:03 [PATCH 1/2] Check for Perl 5.26.0 from Meson build Peter Oliver
2025-01-20 16:03 ` [PATCH 2/2] Fix Meson Perl version check Peter Oliver
2025-01-21 6:44 ` Patrick Steinhardt
2025-01-21 6:44 ` [PATCH 1/2] Check for Perl 5.26.0 from Meson build Patrick Steinhardt
2025-01-24 16:30 ` [PATCH v2 0/2] Fix Meson Perl version check Peter Oliver
2025-01-24 16:30 ` [PATCH v2 1/2] meson: bump minimum required Perl version to 5.26.0 Peter Oliver
2025-01-24 16:30 ` [PATCH v2 2/2] meson: fix Perl version check for Meson versions before 1.7.0 Peter Oliver
2025-01-27 7:39 ` Patrick Steinhardt [this message]
2025-02-18 15:30 ` [PATCH v3 0/2] Fix Meson Perl version check Peter Oliver
2025-02-18 15:30 ` [PATCH v3 1/2] meson: bump minimum required Perl version to 5.26.0 Peter Oliver
2025-02-18 15:30 ` [PATCH v3 2/2] meson: fix Perl version check for Meson versions before 1.7.0 Peter Oliver
2025-02-18 19:12 ` [PATCH v3 0/2] Fix Meson Perl version check Junio C Hamano
2025-02-19 7:17 ` Patrick Steinhardt
2025-02-19 16:05 ` Junio C Hamano
2025-02-25 12:28 ` Peter Oliver
2025-02-25 18:20 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z5c4OzzHWOo30Hu6@pks.im \
--to=ps@pks.im \
--cc=git@mavit.org.uk \
--cc=git@vger.kernel.org \
--cc=p.d.oliver@mavit.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).