From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 98282158200 for ; Sat, 13 Sep 2025 23:51:52 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 4064C340FDB for ; Sat, 13 Sep 2025 23:51:52 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 45778110572; Sat, 13 Sep 2025 23:51:49 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id 3D05F110572 for ; Sat, 13 Sep 2025 23:51:49 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id CC57C340ED8 for ; Sat, 13 Sep 2025 23:51:48 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 29FB63993 for ; Sat, 13 Sep 2025 23:51:47 +0000 (UTC) From: "Kerin Millar" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Kerin Millar" Message-ID: <1757807148.42a137eb54c2adba26d4030b981bdf3a1433534e.kfm@gentoo> Subject: [gentoo-commits] proj/locale-gen:master commit in: / X-VCS-Repository: proj/locale-gen X-VCS-Files: locale-gen X-VCS-Directories: / X-VCS-Committer: kfm X-VCS-Committer-Name: Kerin Millar X-VCS-Revision: 42a137eb54c2adba26d4030b981bdf3a1433534e X-VCS-Branch: master Date: Sat, 13 Sep 2025 23:51:47 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 41e7839a-db78-4b9f-be50-7adb1fe0da17 X-Archives-Hash: 2267be865953084f0a0ed38d49acce77 commit: 42a137eb54c2adba26d4030b981bdf3a1433534e Author: Kerin Millar plushkava net> AuthorDate: Sat Sep 13 23:43:54 2025 +0000 Commit: Kerin Millar plushkava net> CommitDate: Sat Sep 13 23:45:48 2025 +0000 URL: https://gitweb.gentoo.org/proj/locale-gen.git/commit/?id=42a137eb Revert "Ignore findmnt(8) exiting 1 where / is not a mountpoint" This reverts commit 4d24a40275db2a0f75cabccade0ef6ea63772194. This is only so that it may be re-applied with a commit message that mentions both the bug reporter and tester. Signed-off-by: Kerin Millar plushkava.net> locale-gen | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/locale-gen b/locale-gen index 8346877..9018e7b 100755 --- a/locale-gen +++ b/locale-gen @@ -652,16 +652,15 @@ sub dirname ($path) { } sub has_mount_option ($target, $option) { - # Per bug 962817, / may not necessarily exist as a mountpoint. Assuming - # it does not, ignore the case that findmnt(8) exits with a status of 1. - local $ENV{'TARGET'} = $target; - my $stdout = qx{ - findmnt -no options -T "\$TARGET" - case \$? in 1) ! mountpoint -q / ;; *) exit "\$?" ;; esac - }; - throw_child_error('findmnt'); - chomp $stdout; - return ",$stdout," =~ m/\Q,$option,/; + if (! open my $pipe, '-|', qw( findmnt -no options -T ), $target) { + exit 1; + } else { + chomp(my $stdout = do { local $/; readline $pipe }); + if (! close $pipe && $! == 0) { + throw_child_error('findmnt'); + } + return ",$stdout," =~ m/\Q,$option,/; + } } sub can_run ($bin) {