tech-pkg archive

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

Shell portability checks (was: Re: Please help to fix outdated SUBST blocks)



On 04.05.2020 21:38, Joerg Sonnenberger wrote:
On Mon, May 04, 2020 at 09:07:09PM +0200, Roland Illig wrote:
I agree that having the stricter shell portability check generates more
packages that fail to build.  The point is that before, they succeeded
to build but under wrong assumptions.  I prefer to have binary packages
without these easy-to-detect bugs.

The majority of the cases I have seen for the stricter checks are noise.
That doesn't even include the whole autotool source issue, but just that
the majority of the files affected never were used at all.

As a first measure, I have added a rule that fixes the autoconf source
issue:  If a file X is patched, X.in is ignored by the portability
check.  It's easy to add an analogous rule for X.am files if needed, or
for configure.ac.

The current check for [[ may well be overdone.  There's a simpler idea
that is probably much more efficient:  Remove the static analysis and
instead add a tool wrapper for the command [[. This tool wrapper would
fail with a delayed error message, just like a missing perl generates a
warning right now.

Would that help you already?

The "test ==" check is harder though since it is typically a shell
builtin.  For that, I see static analysis as the only way that could
work.  Do you have a better idea for that?

Roland


Home | Main Index | Thread Index | Old Index