On Tue, May 17, 2022 at 11:12:47AM +0200, Peter Krempa wrote:
On Tue, May 17, 2022 at 10:32:12 +0200, Andrea Bolognani wrote:
> +# Before 0.60, meson would sometimes pass options to xgettext in the
> +# wrong order, resulting in unwanted comments showing up in the
> +# potfile after it was refreshed
> +sc_pot_comments:
> + @if $(GREP) -E '^#\. ' $(pot_file) | $(GREP) -Ev 'TRANSLATORS:';
then \
> + echo "Spurious comments in $(pot_file)" 1>&1; \
> + exit 1; \
> + fi
Ewww. This doesn't feel like a systemic fix. If meson can't generate
them properly, we should make sure to call the tool properly rahter than
just check whether it's broken.
Whether meson generates them properly or not is based on a coin flip,
which is why it took me so damn long to get to the bottom of it :)
meson 0.60 and newer always generate the file correctly. Once all
platforms we target have a new enough version we can decide to drop
the check; in the meantime, having it will prevent further cruft from
sneaking in undetected.
Reimplementing the logic ourselves just because of this bug doesn't
sound like a good idea. It would add significant long-term
maintenance burden.
--
Andrea Bolognani / Red Hat / Virtualization