From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on starla X-Spam-Level: X-Spam-Status: No, score=-0.7 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 3C4F21F44D for ; Mon, 22 Apr 2024 11:23:13 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=clisp.org header.i=@clisp.org header.a=rsa-sha256 header.s=strato-dkim-0002 header.b=fiSxJTtN; dkim=fail reason="signature verification failed" header.d=clisp.org header.i=@clisp.org header.a=ed25519-sha256 header.s=strato-dkim-0003 header.b=mhJVgI4+; dkim-atps=neutral Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ryrl6-0001T0-AA; Mon, 22 Apr 2024 07:22:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ryrkr-0001RS-5z for bug-gnulib@gnu.org; Mon, 22 Apr 2024 07:22:39 -0400 Received: from mo4-p00-ob.smtp.rzone.de ([85.215.255.22]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ryrko-0006zR-1V for bug-gnulib@gnu.org; Mon, 22 Apr 2024 07:22:36 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1713784948; cv=none; d=strato.com; s=strato-dkim-0002; b=nLEzYeIevDOmY6G9UHuPgUYee8LcZ7bMQc7PxibTocd2N9MdBaHB8uJv/H+nBBjKU3 t73RQslvpyR1RUAbl66VAQmHM7llijurtREwErJtPtRdjDTRju7ReQtpCjqQjznuGsqV I8lKgnxgcT4HaNJBae6hi9O1chsmOVgpiOgiIfm4A9/H/s4pnZvFvqbit2GtBWcP45NX H5yEeVz0kklj3F+laaQhrHUzipos3Eh1P4SrJgS9A+hqeUxaNFXbSIT+nM3Q3it7TeUn Sw4SHhQr9IpwZhycvs77fzEFMKkDCb6B3JfW+Akavo0UY/zAn8ylT5uVsFdGeLUZBm+Z 0BAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1713784948; s=strato-dkim-0002; d=strato.com; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=4M8vktn1zk8YcdgKHxESzGLI1fnnwNPuUeq7QWLQYpk=; b=q83W+r9zHqFTfMK4fvevbT8ZY2m3WhydaQ3sY0Y7ekNNYYJENUK9ppBi6207HioLqd OL8UI3pNwYUH53b8sSIhOuRkYSnkwf/OxNd3/Qd7Z3eTLLNRhx5bM7qtEXEk6T+FwGdL JlCnimyzgsSiNsBf/r5zqjUKJXK0ku9ljfJ6I0JSB9mcUMLY6B95YNbOs5Nvz+KXPwat z52HbX6andt1P02Ccg8mOBOPvqHQAhi4hoyevsDMsAe3ZoTqGMprx90nhkOeIL7M1+T0 2Ut679c7yfT+UYtCJhAIKVZz6ve03KXoS+fMp2rjjOx9/5qEYqg0O0Z0VlD7ujLntV1G ysqw== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo00 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1713784948; s=strato-dkim-0002; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=4M8vktn1zk8YcdgKHxESzGLI1fnnwNPuUeq7QWLQYpk=; b=fiSxJTtNL31EL6LQ+hrR3fonWanLG2W250vXvIYFNm0HNzQOt+C64YZFVIADaHn9JJ mUfrBVVC4/dju4jikX9Mo+f1fuwimFLuWqbexWMrf24RLmfh5Tld/pnfLc3HUDh4uoVh wZeHe1KPlmIo8avaG4RXp7NxFYLiRdK6KoV41lSeyFdHhk4L5rzjfl35l5MSQvLdpfVt q/gDm8COfwjL5QwKTeGuJ+4gXg2LcJ/qZupQCZavf/ouEKGv4EhzFyG4+WAAjXXmud/i 5ixFvLE3dj17O0LeZWsHRMoBvkfz2ntHZ4oPcHsbrb/CNSHyuMTMuBg8nuYoe+TZDCYm hjYQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1713784948; s=strato-dkim-0003; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=4M8vktn1zk8YcdgKHxESzGLI1fnnwNPuUeq7QWLQYpk=; b=mhJVgI4+nrHh7mv90W9222DqgcgEBzBZXggcFP84IIxYEyrG1WLXXdn9SLC9SluV/n X26jcJxlAJHdubq7cBCQ== X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH0WWb0LN8XZoH94zq68+3cfpPFiP3NJrs+PpjM6dx108YZvLFZnw==" Received: from nimes.localnet by smtp.strato.de (RZmta 50.3.2 AUTH) with ESMTPSA id N8610003MBMMCNP (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Mon, 22 Apr 2024 13:22:22 +0200 (CEST) From: Bruno Haible To: Paul Eggert , bug-gnulib@gnu.org Cc: Collin Funk Subject: Re: GNU gnulib: calling for beta-testers Date: Mon, 22 Apr 2024 13:22:21 +0200 Message-ID: <7660069.1A5YGTmil0@nimes> In-Reply-To: References: <20240421-125239.sv1871.186403@savannah.gnu.org> <19f49454-827d-45ab-8298-ba0bf87e9829@cs.ucla.edu> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="nextPart44560634.hFrVunU0Fj" Content-Transfer-Encoding: 7Bit Received-SPF: none client-ip=85.215.255.22; envelope-from=bruno@clisp.org; helo=mo4-p00-ob.smtp.rzone.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org This is a multi-part message in MIME format. --nextPart44560634.hFrVunU0Fj Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" Thanks for the report, Paul. Thanks for the preliminary investigation, Collin. > > ./bootstrap > > ./configure > > make -k distclean > > git submodule foreach git pull origin master > > git commit -m 'build: update gnulib submodule to latest' gnulib > > ./bootstrap --no-git --gnulib-srcdir=3Dgnulib > >=20 > > The problem is that the Python-based build leaves behind a __pycache__ = directory, which causes the comparison to fail. I reproduce the issue. It's because executing gnulib-tool.py creates gnulib/pygnulib/__pycache__, while gnulib-tool.sh does not do so. Two workarounds are possible. I'm committing both, since the first workaround works only with Python =E2=89=A5 3.8. * Let Python create its cache not in gnulib/pygnulib/__pycache__, but instead in /tmp/gnulib-python-cache-$USER//gnulib/pygnulib/ . * Ignore the __pycache__ directory during the comparison. The first workaround should fix trouble similar to what we regularly see with 'autom4te.cache': Unnecessary difference while comparing source trees, unnecessary "git status" noise. Clutter. 2024-04-22 Bruno Haible gnulib-tool: Fix trouble caused by Python's bytecode cache. Reported by Paul Eggert in . * gnulib-tool: In sh+py mode, ignore the __pycache__ directory during comparison. 2024-04-22 Bruno Haible gnulib-tool.py: Fix trouble caused by Python's bytecode cache. Reported by Paul Eggert in . * gnulib-tool.py: Set PYTHONPYCACHEPREFIX, so as to avoid creating a __pycache__ directory in the developer's gnulib checkout (only effective with Python =E2=89=A5 3.8). --nextPart44560634.hFrVunU0Fj Content-Disposition: attachment; filename="0001-gnulib-tool.py-Fix-trouble-caused-by-Python-s-byteco.patch" Content-Transfer-Encoding: quoted-printable Content-Type: text/x-patch; charset="UTF-8"; name="0001-gnulib-tool.py-Fix-trouble-caused-by-Python-s-byteco.patch" =46rom eda62139d838f53e4953db26019e5a4b8b805847 Mon Sep 17 00:00:00 2001 =46rom: Bruno Haible Date: Mon, 22 Apr 2024 13:11:05 +0200 Subject: [PATCH 1/2] gnulib-tool.py: Fix trouble caused by Python's bytecode cache. MIME-Version: 1.0 Content-Type: text/plain; charset=3DUTF-8 Content-Transfer-Encoding: 8bit Reported by Paul Eggert in . * gnulib-tool.py: Set PYTHONPYCACHEPREFIX, so as to avoid creating a __pycache__ directory in the developer's gnulib checkout (only effective with Python =E2=89=A5 3.8). =2D-- ChangeLog | 9 +++++++++ gnulib-tool.py | 6 ++++++ 2 files changed, 15 insertions(+) diff --git a/ChangeLog b/ChangeLog index b3cef64936..4a272d326e 100644 =2D-- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2024-04-22 Bruno Haible + + gnulib-tool.py: Fix trouble caused by Python's bytecode cache. + Reported by Paul Eggert in + . + * gnulib-tool.py: Set PYTHONPYCACHEPREFIX, so as to avoid creating a + __pycache__ directory in the developer's gnulib checkout (only effective + with Python =E2=89=A5 3.8). + 2024-04-21 Collin Funk =20 gnulib-tool.py: Make temporary directories recognizable. diff --git a/gnulib-tool.py b/gnulib-tool.py index cdcd316909..81537c272c 100755 =2D-- a/gnulib-tool.py +++ b/gnulib-tool.py @@ -144,6 +144,12 @@ func_fatal_error "python3 not found; try setting GNULIB_TOOL_IMPL=3Dsh" fi =20 +# Tell Python to store the compiled bytecode outside the gnulib directory. +if test -z "$PYTHONPYCACHEPREFIX"; then + PYTHONPYCACHEPREFIX=3D"${TMPDIR-/tmp}/gnulib-python-cache-${USER-$LOGNAM= E}" + export PYTHONPYCACHEPREFIX +fi + profiler_args=3D # For profiling, cf. . #profiler_args=3D"-m cProfile -s tottime" =2D-=20 2.34.1 --nextPart44560634.hFrVunU0Fj Content-Disposition: attachment; filename="0002-gnulib-tool-Fix-trouble-caused-by-Python-s-bytecode-.patch" Content-Transfer-Encoding: 7Bit Content-Type: text/x-patch; charset="UTF-8"; name="0002-gnulib-tool-Fix-trouble-caused-by-Python-s-bytecode-.patch" >From ab5390ae6d8db323420874d1c1334feb77af9cb1 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 22 Apr 2024 13:12:35 +0200 Subject: [PATCH 2/2] gnulib-tool: Fix trouble caused by Python's bytecode cache. Reported by Paul Eggert in . * gnulib-tool: In sh+py mode, ignore the __pycache__ directory during comparison. --- ChangeLog | 8 ++++++++ gnulib-tool | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 4a272d326e..462823888d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2024-04-22 Bruno Haible + + gnulib-tool: Fix trouble caused by Python's bytecode cache. + Reported by Paul Eggert in + . + * gnulib-tool: In sh+py mode, ignore the __pycache__ directory during + comparison. + 2024-04-22 Bruno Haible gnulib-tool.py: Fix trouble caused by Python's bytecode cache. diff --git a/gnulib-tool b/gnulib-tool index 6d430e56e6..85b62883c6 100755 --- a/gnulib-tool +++ b/gnulib-tool @@ -199,7 +199,7 @@ case "$GNULIB_TOOL_IMPL" in else diff_options= fi - diff -r $diff_options -q . "$tmp" >/dev/null || + diff -r $diff_options --exclude=__pycache__ -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.34.1 --nextPart44560634.hFrVunU0Fj--