[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v2 0/8] restore compatibility with pre-POSIX shells in config.gue

From: Jacob Bachmeyer
Subject: [PATCH v2 0/8] restore compatibility with pre-POSIX shells in config.guess
Date: Wed, 26 May 2021 21:26:02 -0400

This patch series tidies config.guess and reverts to classic backtick
command substitutions.  This is a respin after the earlier series
proved difficult to properly review.

Quotes while forming the output are pointless, since no valid GNU
configuration tuple contains whitespace, therefore no variables
interpolated will be candidates for word splitting.  However, there
are places in the script where unquoted variables could cause
legitimate problems, so the script was reworked to store the
uname-based guess in a GUESS variable instead of suppressing the
shellcheck complaint.  Since no shell splits the right hand side of a
variable assignment, this form avoids the need to quote variables.

Logically, config.guess should remain compatible with pre-POSIX
shells; this is not difficult and the script purports to identify a
variety of older systems that probably never had POSIX shells.

In the interim, a few changes were made upstream and this patch series
is based on commit 4550d2f15b3a7ce2451c1f29500b9339430c877f.  Patch 1
from the original series was effectively merged upstream and is
included in the baseline.  Patch 2 in the original series became
patches 1 and 2 in this series.  Patches 3 and 4 in the original
series became patches 3, 4, and 5 in this series, with most of the
automatic work being collected into patch 3, a small sed-based fixup
in patch 4, and manual fixups in patch 5 to complete preparations for
patches 6 and 7.  Patches 6 and 7 revert POSIX $( ) command
substitutions to the traditional backtick form, with most of the work
performed using an automatic tool in patch 6 and a few cases that
could not be handled automatically resolved in patch 7.  Lastly, patch
8 removes the one-off tools from the working tree, and collects all
three of the Awk programs used for convenient review.

Jacob Bachmeyer (8):
  config.guess: use intermediate variable with uname results
  config.guess: manual fixups after previous automatic patch
  config.guess: remove unneeded quotes and factor command substitutions
  config.guess: automatic fixups after previous automated patch
  config.guess: manual fixup after previous automated patches
  config.guess: replace POSIX $( ) with classic ` ` throughout
  config.guess: manual fixups after previous automatic patch
  remove automatic patch generators

 config.guess | 1182 ++++++++++++++++++++++++++------------------------
 1 file changed, 614 insertions(+), 568 deletions(-)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]