GNU bug report logs -
#60772
[PATCH] tests: rework gettext to only check 'external' behavior
Previous Next
Reported by: Mike Frysinger <vapier <at> gentoo.org>
Date: Fri, 13 Jan 2023 05:22:02 UTC
Severity: normal
Tags: patch
Done: Mike Frysinger <vapier <at> gentoo.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 60772 in the body.
You can then email your comments to 60772 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
automake-patches <at> gnu.org
:
bug#60772
; Package
automake-patches
.
(Fri, 13 Jan 2023 05:22:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Mike Frysinger <vapier <at> gentoo.org>
:
New bug report received and forwarded. Copy sent to
automake-patches <at> gnu.org
.
(Fri, 13 Jan 2023 05:22:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
The gettext project deprecated non-external use back in 2010 with the
0.18 release, and made it fatal with the 0.20 release in 2019. With
that version, calling AM_GNU_GETTEXT() fails, which means all Automake
tests are now skipped. The t/gettext-macros.sh helper probes gettext
as such:
>+ autopoint --force
> autopoint: *** AM_GNU_GETTEXT without 'external' argument is no longer supported in version 0.21.1
> autopoint: *** Stop.
> ...
>+ aclocal-1.16 -Werror -Wno-syntax -I m4 --install
> aclocal-1.16: warnings are treated as errors
> configure.ac:4: warning: macro 'AM_GNU_GETTEXT' not found in library
> configure.ac:5: warning: macro 'AM_GNU_GETTEXT_VERSION' not found in library
>+ echo skip_all_ "couldn't find or get gettext macros"
Since t/gettext-macros.sh generates a helper that all other gettext
tests use to see if gettext is available, all they get skipped.
Rework our existing tests to only check the 'external' gettext mode.
This should work with older versions, and we don't really need to
keep track of old non-external mode since it's been deprecated for
so long.
* t/gettext-basics.sh: Use external gettext mode, and adjust tests.
* t/gettext-config-rpath.sh: Likewise.
* t/gettext-macros.sh: Likewise.
* t/gettext-pr381.sh: Likewise.
* t/subdir-cond-gettext.sh: Likewise.
---
t/gettext-basics.sh | 19 ++++++-------------
t/gettext-config-rpath.sh | 6 +++---
t/gettext-macros.sh | 2 +-
t/gettext-pr381.sh | 2 +-
t/subdir-cond-gettext.sh | 6 +++---
5 files changed, 14 insertions(+), 21 deletions(-)
diff --git a/t/gettext-basics.sh b/t/gettext-basics.sh
index 93fe782f4027..6d733928c68f 100644
--- a/t/gettext-basics.sh
+++ b/t/gettext-basics.sh
@@ -20,7 +20,7 @@ required='gettext'
. test-init.sh
cat >> configure.ac << 'END'
-AM_GNU_GETTEXT
+AM_GNU_GETTEXT([external])
AC_OUTPUT
END
@@ -31,28 +31,21 @@ mkdir po intl
$ACLOCAL
$AUTOCONF
-# po/ and intl/ are required.
+# po/ is required. intl/ should not be used.
AUTOMAKE_fails --add-missing
grep 'AM_GNU_GETTEXT.*SUBDIRS' stderr
echo 'SUBDIRS = po' >Makefile.am
-AUTOMAKE_fails --add-missing
-grep 'AM_GNU_GETTEXT.*intl' stderr
+# Should not fail.
+$AUTOMAKE --add-missing
echo 'SUBDIRS = intl' >Makefile.am
AUTOMAKE_fails --add-missing
grep 'AM_GNU_GETTEXT.*po' stderr
-# Ok.
-
echo 'SUBDIRS = po intl' >Makefile.am
-$AUTOMAKE --add-missing
-
-# Make sure distcheck runs './configure --with-included-gettext'.
-./configure
-echo distdir: > po/Makefile
-echo distdir: > intl/Makefile
-$MAKE -n distcheck | grep '.*--with-included-gettext'
+AUTOMAKE_fails --add-missing
+grep 'intl.*SUBDIRS.*AM_GNU_GETTEXT' stderr
:
diff --git a/t/gettext-config-rpath.sh b/t/gettext-config-rpath.sh
index 3953a0c3df83..522b42fce967 100644
--- a/t/gettext-config-rpath.sh
+++ b/t/gettext-config-rpath.sh
@@ -20,14 +20,14 @@ required='gettext'
. test-init.sh
cat >> configure.ac << 'END'
-AM_GNU_GETTEXT
+AM_GNU_GETTEXT([external])
# config.rpath is required by versions >= 0.14.3.
AM_GNU_GETTEXT_VERSION([0.14.3])
AC_OUTPUT
END
-echo 'SUBDIRS = po intl' >Makefile.am
-mkdir po intl
+echo 'SUBDIRS = po' >Makefile.am
+mkdir po
# If aclocal fails here, it may be that gettext is too old to provide
# AM_GNU_GETTEXT_VERSION. Similarly, autopoint will fail if it's
diff --git a/t/gettext-macros.sh b/t/gettext-macros.sh
index e352e679079e..c91f005a1e3b 100644
--- a/t/gettext-macros.sh
+++ b/t/gettext-macros.sh
@@ -48,7 +48,7 @@ cat > configure.ac <<END
AC_INIT([foo], [1.0])
AC_PROG_CC
# Both required by autopoint.
-AM_GNU_GETTEXT
+AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION([$autopoint_version])
END
diff --git a/t/gettext-pr381.sh b/t/gettext-pr381.sh
index 562e2226cee6..cac197271f46 100644
--- a/t/gettext-pr381.sh
+++ b/t/gettext-pr381.sh
@@ -21,7 +21,7 @@ required='gettext'
. test-init.sh
cat >> configure.ac << 'END'
-AM_GNU_GETTEXT
+AM_GNU_GETTEXT([external])
AC_OUTPUT
END
diff --git a/t/subdir-cond-gettext.sh b/t/subdir-cond-gettext.sh
index 023eff134885..a203c025d308 100644
--- a/t/subdir-cond-gettext.sh
+++ b/t/subdir-cond-gettext.sh
@@ -20,18 +20,18 @@ required=gettext
. test-init.sh
cat >> configure.ac << 'END'
-AM_GNU_GETTEXT
+AM_GNU_GETTEXT([external])
AM_CONDITIONAL([MAUDE], [true])
ALL_LINGUAS=
AC_SUBST([ALL_LINGUAS])
END
-mkdir po intl
+mkdir po
: >config.rpath
cat > Makefile.am << 'END'
if MAUDE
-SUBDIRS = po intl
+SUBDIRS = po
else
SUBDIRS =
endif
--
2.39.0
Information forwarded
to
automake-patches <at> gnu.org
:
bug#60772
; Package
automake-patches
.
(Fri, 13 Jan 2023 23:53:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 60772 <at> debbugs.gnu.org (full text, mbox):
Subject: [bug#60772] [PATCH] tests: rework gettext to only check 'external'
behavior
Good catch, thanks. Please commit.
+# po/ is required. intl/ should not be used.
Perhaps add the bit of information from your mail to help future
sleuths:
"... not be used, since non-external use of gettext was deprecated in
2010 (gettext 0.18) and made fatal in 0.20 (2019)."
Thanks,
Karl
Information forwarded
to
automake-patches <at> gnu.org
:
bug#60772
; Package
automake-patches
.
(Sat, 14 Jan 2023 05:45:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 60772 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 13 Jan 2023 16:52, Karl Berry wrote:
> Subject: [bug#60772] [PATCH] tests: rework gettext to only check 'external'
> behavior
>
> Good catch, thanks. Please commit.
>
> +# po/ is required. intl/ should not be used.
>
> Perhaps add the bit of information from your mail to help future
> sleuths:
>
> "... not be used, since non-external use of gettext was deprecated in
> 2010 (gettext 0.18) and made fatal in 0.20 (2019)."
will do, and have done
-mike
[signature.asc (application/pgp-signature, inline)]
bug closed, send any further explanations to
60772 <at> debbugs.gnu.org and Mike Frysinger <vapier <at> gentoo.org>
Request was from
Mike Frysinger <vapier <at> gentoo.org>
to
control <at> debbugs.gnu.org
.
(Sat, 14 Jan 2023 05:45:03 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 11 Feb 2023 12:24:11 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 67 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.