Ozkan Sezer wrote:
On 7/3/21, Jacob Bachmeyer <jcb62...@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.
I get no errors with either of them when pasting them at shellcheck.net
as of commit 45e181800a6a27268a9c5d79dcc60492fef9a9a0. Looking up
SC1117 shows that you are using a very old shellcheck -- that error was
retired due to excessive pedantry. (Which is also how I view the
complaints about backticks and expr...)
Off-topic: check-sub fails on my old setup with CentOS-6.10:
config-sub.sh: line 12: shopt: lastpipe: invalid shell option name
That is part of the reason that I did not already write a patch for
config.sub: when I last checked, that test script also failed on
fencepost! (A server available to GNU maintainers (I now maintain
DejaGnu, which uses config.guess) as a reference GNU platform among
other uses. Code that does not work there is probably "a bit" bleeding
edge for general use.)
If there is interest, I could puzzle out what that script actually does
and look into writing a patch to make it more compatible with
not-quite-absolute-latest bash, but you seem to be taking care of the
major change I would consider useful to config.sub. :-) Thanks.
-- Jacob