config-patches
[Top][All Lists]
Advanced

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

Re: [PATCH] config.sub: go back to backtick substitutions


From: Ozkan Sezer
Subject: Re: [PATCH] config.sub: go back to backtick substitutions
Date: Sat, 3 Jul 2021 11:52:18 +0300

On 7/3/21, Jacob Bachmeyer <jcb62281@gmail.com> wrote:
> Ozkan Sezer wrote:
>> The attached patch replaces a handful of POSIX $(xx) with classic `xx`
>> in config.sub. This is in line with the recent config.guess change i.e.
>> commit d70c4fa934de:
>> http://git.savannah.gnu.org/gitweb/?p=config.git;a=commit;h=d70c4fa934de164178054c3a60aaa0024ed07c91
>>
>> --
>> O.S.
>>
>
> While doing this, also normalizing the quoting in the `echo FOO | sed
> ...` would be nice.  Some cases quote the argument to echo and some do
> not.  At runtime it probably does not matter because the substituted
> values will never contain whitespace, but quoting them all would make
> shellcheck more useful.
>
> Also see patch 5 in the recent "v2" series for the marker line to
> prevent shellcheck from complaining about backticks.  It must be placed
> before the first executable line (the timestamp variable assignment) for
> shellcheck to apply it to the entire script.
>
>
> -- Jacob

Done, as best as I can: Attached patches.

$ make check-sub
cd testsuite && bash config-sub.sh
PASS: config.sub checks (864 tests)
PASS: config.sub idempotency checks (801 tests)
PASS: config.sub canonicalise each config.guess testcase (136 tests)

shellcheck barfs with SC1117 in config.guess, but no errors with
config.sub.

Off-topic: check-sub fails on my old setup with CentOS-6.10:
config-sub.sh: line 12: shopt: lastpipe: invalid shell option name

--
O.S.

Attachment: 0001-config.sub-go-back-to-backtick-substitutions.patch
Description: Text Data

Attachment: 0002-config.sub-normalize-quoting-in-the.patch
Description: Text Data

Attachment: 0003-config.sub-disable-shellcheck-SC2006-SC2268.patch
Description: Text Data


reply via email to

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