pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Improve setup of environment values for commands in MSVC's vcreg
Date: Wed, 11 May 2022 01:24:16 +0000
Message-ID: <E1nob5L-0005dL-UZ@gemulon.postgresql.org> (raw)
Improve setup of environment values for commands in MSVC's vcregress.pl
The current setup assumes that commands for lz4, zstd and gzip always
exist by default if not enforced by a user's environment. However,
vcpkg, as one example, installs libraries but no binaries, so this
default setup to assume that a command should always be present would
cause failures. This commit improves the detection of such external
commands as follows:
* If a ENV value is available, trust the environment/user and use it.
* If a ENV value is not available, check its execution by looking in the
current PATH, by launching a simple "$command --version" (that should be
portable enough).
** On execution failure, ignore ENV{command}.
** On execution success, set ENV{command} = "$command".
Note that this new rule applies to gzip, lz4 and zstd but not tar that
we assume will always exist. Those commands are set up in the
environment only when using bincheck and taptest. The CI includes all
those commands and I have checked that their setup is correct there. I
have also tested this change in a MSVC environment where we have none of
those commands.
While on it, remove the references to lz4 from the documentation and
vcregress.pl in ~v13. --with-lz4 has been added in v14~ so there is no
point to have this information in these older branches.
Reported-by: Andrew Dunstan
Reviewed-by: Andrew Dunstan
Discussion: https://postgr.es/m/14402151-376b-a57a-6d0c-10ad12608e12@dunslane.net
Backpatch-through: 10
Branch
------
REL_11_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/f0fb2e9509e90322dfc73f9a817f1488afa03bf6
Modified Files
--------------
doc/src/sgml/install-windows.sgml | 9 ---------
src/tools/msvc/vcregress.pl | 39 ++++++++++++++++++++++++++++++++++++---
2 files changed, 36 insertions(+), 12 deletions(-)
view thread (6+ messages) latest in thread
Message-ID: <E1nob5L-0005dL-UZ@gemulon.postgresql.org> Permalink: ../E1nob5L-0005dL-UZ@gemulon.postgresql.org/ Also on: postgresql.org/message-id/E1nob5L-0005dL-UZ@gemulon.postgresql.org ·
reply
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Reply to all the recipients from your mail client; the link fills in the headers below: reply via email Some clients, webmail especially, drop In-Reply-To and References from a link, and the reply then starts a new thread: use the mbox below. To: pgsql-committers@postgresql.org Cc: michael@paquier.xyz Subject: Re: pgsql: Improve setup of environment values for commands in MSVC's vcreg In-Reply-To: <E1nob5L-0005dL-UZ@gemulon.postgresql.org> References: <E1nob5L-0005dL-UZ@gemulon.postgresql.org> * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox