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 B29D91F44D for ; Sat, 20 Apr 2024 22:32:14 +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=SxCqupq7; 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=sqlGZOjf; dkim-atps=neutral Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ryJFd-0002og-NF; Sat, 20 Apr 2024 18:32:06 -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 1ryJFb-0002oW-Rv for bug-gnulib@gnu.org; Sat, 20 Apr 2024 18:32:03 -0400 Received: from mo4-p00-ob.smtp.rzone.de ([85.215.255.24]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ryJFZ-0001m9-5W for bug-gnulib@gnu.org; Sat, 20 Apr 2024 18:32:03 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1713652309; cv=none; d=strato.com; s=strato-dkim-0002; b=AZNGIlDukcKF6NKlerwXjcUhcLACluu61MR/uj3pW+516JB/kI8wpb0TCds+Gys5G1 0D2Aal3aj6FLer6QODBaELomtVRPGQiuyzB+2lsm6PV1+MJhQVlRy0rok4FVv7/qxPts IDm2CO2JqFEFnYmG07D3c0iWyrRDc7OagoBXsm/VmFbj8lQjd4ENllbKwxc7MsQ1OEpG ub7Vf4dDgppDZNhwaQIWa+96ubsIAuDhWem/Kuio1gdUT6QY6/m05b3l0CkvFyUEZytQ h5mPhvnG0ZzS/3pf0KLoOZSiBmH3tZlmcGDzaFX3YjnIoh+avzWDQDp5JfKCEPPrbJo+ Rthw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1713652309; s=strato-dkim-0002; d=strato.com; h=References:In-Reply-To:Message-ID:Date:Subject:To:From:Cc:Date:From: Subject:Sender; bh=MZgEoQaX5IhXQXdKiuisrbzRvSE4TJ3uzPppYCiYnKM=; b=VI/n0BBpLglSxf30xZIv/o+pgZhoksHkRKdDTFDrom6xsjterqcqPDoxhHgBc1Tk/N B6J5K/9rtVwHDH4Mt5YQO2RcXbXTOr5rilHDietio989Re9yvCFJdp+Hs1jWEuuOmwtW BNeIaIcOVgmPRxi/snlJniQhLO7RIgx1QnESKZ1xeGo6AerSL6uwOU5Y+Ex/7al10BxL 0QUiq5TG7KLouiAZFOpO0GWN/7ZpFhRSb+7U52/vJ9ST5jzKwvidyB7n7t2yQAHcSmS3 pda42wngWlVkaRvaHidVB7ycxxosKweFLAhKinWfh+jfNLiT2PWfgU8BcbRmmhS62I0+ YXJA== 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=1713652309; s=strato-dkim-0002; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:To:From:Cc:Date:From: Subject:Sender; bh=MZgEoQaX5IhXQXdKiuisrbzRvSE4TJ3uzPppYCiYnKM=; b=SxCqupq7RJadjS3he9dJfLHqP59UE0sYVVxLKzYgs8OpWydLOwPNV89BzHPbTrGQEr pPnILPm3eytZx8re5ibsmyRjoFjmABL0mO336RX/rhftQcI1ySLI0Gbbh10igxgoajbI LZQgrp9PDrynTHajdjPmgteagrq67yWjmxoF773/SpMxBSI/h14hmVvT1QNn6kP1mP4Q +uX+5hqHcFPpPc1NQ/WmRaza3bllwW+ggt1SfmJRzRJP0IedwTlKwtd/5aIlyoutA6eY v4nXsQ9s28TAG8wKrnp6c3bmI98O/nAvre7QhziwNCPU57Oo4N4pl4r7FXjkqu8DfUMx FHEw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1713652309; s=strato-dkim-0003; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:To:From:Cc:Date:From: Subject:Sender; bh=MZgEoQaX5IhXQXdKiuisrbzRvSE4TJ3uzPppYCiYnKM=; b=sqlGZOjfJHmgiSkinGPC15b+IyXyeYOxmdoOVoEdqWnKf/qnv62Ygz8DjbYfTLXohL eE8ANfTmG9l0BWOAiZAA== X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH0WWb0LN8XZoH94zq68+3cfpPAiaPMnJmP1xDOek2uMY1V7OI6Ag==" Received: from nimes.localnet by smtp.strato.de (RZmta 50.3.2 AUTH) with ESMTPSA id N8610003KMVm7FH (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Sun, 21 Apr 2024 00:31:48 +0200 (CEST) From: Bruno Haible To: bug-gnulib@gnu.org, Paul Eggert Subject: gnulib-tool: In sh+py mode, don't fail because of dangling symlinks Date: Sun, 21 Apr 2024 00:31:48 +0200 Message-ID: <6372494.GgVqTqa4M0@nimes> In-Reply-To: <34ecc803-8d4c-4ebd-8121-49dd08229cdb@cs.ucla.edu> References: <17575364.8ZXASUQcjA@nimes> <34ecc803-8d4c-4ebd-8121-49dd08229cdb@cs.ucla.edu> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" Received-SPF: none client-ip=85.215.255.24; 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 Paul Eggert reported: > I tried this on my well-worn copy of GNU diffutils, and got the=20 > following diagnostics. These were all diagnostics about backup files, or= =20 > files I manually deleted by moving them into a '.del' subdirectory (an=20 > old habit of mine), or symlink loops that I had created to test. >=20 > Perhaps the advice should start with, "Start with a fresh checkout from=20 > Git." >=20 > ----- > diff: ./.del/gnulib-tests/test-fnmatch-1.sh: No such file or directory > diff: /home/eggert/src/gnu/glpyXeRWfy/.del/gnulib-tests/test-fnmatch-1.sh= : No such file or directory > ... These old files most likely were not backup files, but dangling symlinks. With dangling symlinks, I can reproduce the error, and this patch fixes it: 2024-04-20 Bruno Haible gnulib-tool: In sh+py mode, don't fail because of dangling symlinks. Reported by Paul Eggert in and P=E1draig Brady in . * gnulib-tool: In sh+py mode, use diff option '--no-dereference' if available. diff --git a/gnulib-tool b/gnulib-tool index d7b6d33912..6d430e56e6 100755 =2D-- a/gnulib-tool +++ b/gnulib-tool @@ -192,7 +192,14 @@ case "$GNULIB_TOOL_IMPL" in func_fatal_error "gnulib-tool.sh succeeded but gnulib-tool.py fa= iled! Inspect $tmp/ and $tmp-py-err." fi # Compare the two results on the file system. =2D diff -r -q . "$tmp" >/dev/null || + # GNU diffutils 3.3 or newer support option --no-dereference. This + # option avoids errors on dangling links. + if LC_ALL=3DC diff --help 2>/dev/null | grep no-dereference >/dev/= null; then + diff_options=3D'--no-dereference' + else + diff_options=3D + fi + diff -r $diff_options -q . "$tmp" >/dev/null || func_fatal_error "gnulib-tool.py produced different files than g= nulib-tool.sh! Compare `pwd` and $tmp." # Compare the two outputs. diff -q "$tmp-sh-out" "$tmp-py-out" >/dev/null || @@ -235,7 +242,14 @@ case "$GNULIB_TOOL_IMPL" in func_fatal_error "gnulib-tool.sh succeeded but gnulib-tool.py fa= iled! Inspect $tmp/ and $tmp-py-err." fi # Compare the two results on the file system. =2D diff -r -q "$dir" "$tmp" >/dev/null || + # GNU diffutils 3.3 or newer support option --no-dereference. This + # option avoids errors on dangling links. + if LC_ALL=3DC diff --help 2>/dev/null | grep no-dereference >/dev/= null; then + diff_options=3D'--no-dereference' + else + diff_options=3D + fi + diff -r $diff_options -q "$dir" "$tmp" >/dev/null || func_fatal_error "gnulib-tool.py produced different files than g= nulib-tool.sh! Compare $dir and $tmp." # Compare the two outputs. diff -q "$tmp-sh-out" "$tmp-py-out" >/dev/null ||