On 5/4/24 10:54 PM, Paul Eggert wrote:
>> I was using Autoconf 2.72 on my system.
>
> Ah, I am using Autoconf 2.71, which is what's in /usr/bin/autoconf on Fedora 
> 40. It comes from the autoconf-2.71-10.fc40.noarch package, which is the 
> current version for Fedora 40.
> 
> Occasionlly I use bleeding-edge autoconf (even past 2.72) but that's only to 
> test Autoconf, not other packages.

When Bruno was creating the test suite for gnulib-tool.py we had some
issues with our gperf and bison --version's being different leading to
different files being generated.

I probably installed Autoconf 2.72 because I expected different
versions there to cause issues.

I found the commit where the sorting in that file changed:

    
https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=c2ab755698db245898a4cc89149eb5df256e4bd0

>> -        diff -r $diff_options --exclude=__pycache__ -q . "$tmp" >/dev/null 
>> ||
>> +        diff -r $diff_options --exclude=__pycache__ 
>> --exclude=autom4te.cache -q . "$tmp" >/dev/null ||
> 
> Looks good to me, thanks. (I didn't bother testing it on my old slow machine.)

I've applied the attached patch.

Collin
From 987535a15d4d2902818661feb6d6b363e4d7af2b Mon Sep 17 00:00:00 2001
From: Collin Funk <collin.fu...@gmail.com>
Date: Sat, 4 May 2024 23:46:02 -0700
Subject: [PATCH] gnulib-tool: Ignore autom4te.cache when using
 GNULIB_TOOL_IMPL=sh+py.

Reported by Paul Eggert in:
<https://lists.gnu.org/archive/html/bug-gnulib/2024-05/msg00061.html>.

* gnulib-tool: Don't compare the autom4te.cache directory since requests
are not sorted in Autoconf version 2.71 and below.
---
 ChangeLog   | 8 ++++++++
 gnulib-tool | 2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 4b5b9bad06..f8e20e06c6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2024-05-04  Collin Funk  <collin.fu...@gmail.com>
+
+	gnulib-tool: Ignore autom4te.cache when using GNULIB_TOOL_IMPL=sh+py.
+	Reported by Paul Eggert in:
+	<https://lists.gnu.org/archive/html/bug-gnulib/2024-05/msg00061.html>.
+	* gnulib-tool: Don't compare the autom4te.cache directory since requests
+	are not sorted in Autoconf version 2.71 and below.
+
 2024-05-04  Bruno Haible  <br...@clisp.org>
 
 	readutmp, boot-time: Work around a Cygwin 3.5.3 bug.
diff --git a/gnulib-tool b/gnulib-tool
index 56c4473318..789fe916a8 100755
--- a/gnulib-tool
+++ b/gnulib-tool
@@ -209,7 +209,7 @@ case "$GNULIB_TOOL_IMPL" in
         else
           diff_options=
         fi
-        diff -r $diff_options --exclude=__pycache__ -q . "$tmp" >/dev/null ||
+        diff -r $diff_options --exclude=__pycache__ --exclude=autom4te.cache -q . "$tmp" >/dev/null ||
           func_fatal_error "gnulib-tool.py produced different files than gnulib-tool.sh! Compare `pwd` and $tmp."
         # Compare the two outputs.
         diff -q "$tmp-sh-out" "$tmp-py-out" >/dev/null ||
-- 
2.45.0

Reply via email to