Hello,
I was grepping around the ports tree and I found a few places where
unnecessary brackets were used with 'tr'. Using square brackets with tr
for character ranges is unnecessary, and in fact the brackets are
treated literally:
ryzen$ echo "[hello]" | tr -d a-z
[]
ryzen$ echo "[hello]" | tr -d '[a-z]'
Most of the issues were found in the patch folders for various ports, so
I'm not really sure what the procedure is for fixing that. Not sure if
this is at all useful, but hopefully somebody more knowledgeable about
the ports system could offer some guidance, as these are technically bugs.
ryzen$ rg "tr '\[" ports/
ports/infrastructure/db/config.guess
866: echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed
's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e
's/[-(].*//'`-gnu
ports/benchmarks/wrk/patches/patch-Makefile
12: TARGET := $(shell uname -s | tr '[A-Z]' '[a-z]' 2>/dev/null || echo
unknown)
ports/emulators/qemu/patches/patch-configure
81: def=CONFIG_AUDIO_$(echo $drv | LC_ALL=C tr '[a-z]' '[A-Z]')
ports/print/lilypond/patches/patch-aclocal_m4
17: vervar="`echo $1 | tr '[a-z]' '[A-Z]'`_VERSION"
ports/security/cracklib/patches/patch-util_cracklib-format
17: tr '[A-Z]' '[a-z]' |
ports/net/munin/patches/patch-Makefile_config
73:@@ -105,7 +108,7 @@ OSTYPE := $(shell uname | LANG=C tr '[A-Z]'
'[a-z]
Regards,
Jordan