From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Re: master 349798a9b8: Demote errors from utimensat copying directories Date: Sat, 26 Aug 2023 16:22:32 +0800 Message-ID: <87wmxi1ad3.fsf@yahoo.com> References: <835y52meww.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35038"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Bruno Haible , emacs-devel@gnu.org, Paul Eggert To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Aug 26 10:23:59 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qZoaN-0008sN-CZ for ged-emacs-devel@m.gmane-mx.org; Sat, 26 Aug 2023 10:23:59 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qZoZJ-0003i5-0D; Sat, 26 Aug 2023 04:22:53 -0400 Original-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 1qZoZE-0003hd-Vx for emacs-devel@gnu.org; Sat, 26 Aug 2023 04:22:50 -0400 Original-Received: from sonic314-22.consmr.mail.ne1.yahoo.com ([66.163.189.148]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qZoZC-0007wC-Ka for emacs-devel@gnu.org; Sat, 26 Aug 2023 04:22:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1693038164; bh=2X7r+0w3XSeUBGNdk+CJQsRqBDnbHK8ei+ajnP9z0ys=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=TStGqIyUts3BpXSGSzFeu741degLMRbSb7kK9Z4qKS/+RmJps2lfzOm00nVZRXn12fyoai3g1r2ECGrVLVVK3dKtAKuifgkePPkW7XaJIMuliS6fAmzuOovqsOQPjSs2TN6x2JK6cspVd3vF65h8uns3SdHcHXQ7BcHbFnMICukZvKcnCKcgagPGyGVVMHwsWZGOXQ0aIpXogM/iawOA5Wkd6VOF2jqy3T1z5/HCDB0pifUQ/hu1zDcxbnlqba6qljS+0+JtlCZ6fOPtAy96o315bGbN/hPSy2ykTvra9/wLCEBf/oA71Ejt1Cx9WUk6WKgaOSVoWE/E7n56ww5N0w== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1693038164; bh=FdhwEBrStXnNi+KVskKz6q8L5AKHeu+Hd8FxDM+5GBv=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=TFSnFJq+1+Jx5B+glVqA80A1RhFv/Y64Q5otSG/VL3Xd9apXuqWWw+v7hsk4nqhc/lV9yA7vzddgyaQb0M40ZbIVYIW2Giz3+XfJWKza2C7EI4nnBfZXvLCFFpQErcy21oK3shEIEiecAW9jnmw2MCZ2t4r+OMUZHAqvGyz0t+0f1GjPNLa0NhNvLVs0UTmRfMM94XWX2sB7XkSmmQPLnCaldgZqlJlud7TbGYrtwC+af3Q+631v4N5LcROeFS95/QyIslUppk8BWDGYC0yVH+1gtpBZ2/0Sf1Ru8eF7wKBiWKIsNVpt40VZll3jIe8XNt8YlGSC/UTqf8mSiXNC1w== X-YMail-OSG: ec62PjoVM1l_1FibhHH0WGaNZPETCDJlqjJt1zSC4LF4cwcTQ15qRIBTfh3inag NE7lZbpexcxIidNkHOsZK55KhSfzSkzlAVf89u019Iv7ZclZFDdYvvtr3MQPbzbwO3CpVUAa1nVC lNJ8LDccQfrQDsjD8syfV3BFOH7uI1iFJRMzH1ASYX26YmOe46PjmHQ0D68pOoLrYnPB3VDtjRvY Yy9e0KrFYKbtbtqsEv5tiOb5lUMMXBhtVSkdyBL58uTb_n5SWC46vVu4gsbvCGjuQm1HW4BMum6J CeYmJfg3dPyr0LqDtmwP0inhk08RHXE..0AyMVyU0q2mW2I9f_yfVfBzcN3pXv6xocNW_oR2I2DE 7UFWHhrh7qYvy6eGqSQTes0FPy7msuDd0X7ndcFLKBEXRmbptqlFlh3e2q87TsN4Onyoyb5qt0Lf vV9Xa5sNmggoUtP.tuoOnxvB7uU3d66lsT8QQrAWdzjeyLSYAei00cKuvu8TtPHXuWRD8_IYJsLW 96VvpYL6E9nGfTAoOshaViX6zu1.sekso7mn.kowftXM.8NmIIoxwK2jHbStNBlvCw3aB3br8c7N H.JM3bqFdy8AAuoakEmJKsvhoDNtobhEN5vLR94Axn_hLgqZsTqeCALjB1IIRgGbvyfkEIWSXztS CHddBjuhgcWyNNjDfThHFtO8g3lkSyMUAl79jKGntB5ElQf4sTw8PdVtvSwgvof7_moHTf_Qu9Tx pC7nroQ1LQaOHjfShw79H25hxHdpfpr4T9jIlRDbiXZBKiejllH6FxYIBHtqIIBmku8R4.uIf.DH bKgpac.6Z74wbNbKwHUd60IVvRIdebQsZZD2W0chee X-Sonic-MF: X-Sonic-ID: 66ef91df-19f3-4018-b71d-5f4fd83a109f Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic314.consmr.mail.ne1.yahoo.com with HTTP; Sat, 26 Aug 2023 08:22:44 +0000 Original-Received: by hermes--production-sg3-69654d8bd-sv8qw (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID ebd3f55fa584234857de3389d9e1597e; Sat, 26 Aug 2023 08:22:40 +0000 (UTC) In-Reply-To: <835y52meww.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 26 Aug 2023 10:38:39 +0300") X-Mailer: WebService/1.1.21763 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.189.148; envelope-from=luangruo@yahoo.com; helo=sonic314-22.consmr.mail.ne1.yahoo.com 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:309238 Archived-At: Eli Zaretskii writes: >> diff --git a/lisp/files.el b/lisp/files.el >> index 1803eb9..a015dd3 100644 >> --- a/lisp/files.el >> +++ b/lisp/files.el >> @@ -6622,7 +6622,11 @@ copy-directory >> (file-attributes directory)))) >> (follow-flag (unless follow 'nofollow))) >> (if modes (set-file-modes newname modes follow-flag)) >> - (if times (set-file-times newname times follow-flag))))))) >> + (when times >> + ;; Don't didactically fail if file times can't be set, as >> + ;; some file systems forbid modifying them. >> + (with-demoted-errors "Setting file times: %s" >> + (set-file-times newname times follow-flag)))))))) > > I think we should only demote these errors on Android, not on other > systems. Setting correct file times when copying/modifying files is > an important feature, and users should be alerted when it somehow > fails, unless the failure is expected. And it only is expected on > Android, AFAIU. Given that, I'll resort to disrearding such errors from set-file-times only on the pertinent filesystems instead. > Alternatively, the Gnulib folks (CC'd) should modify their fdutimens > replacement to return ENOSYS/ENOTSUP on Android filesystems. Gnulib is not relevant here, as the ``filesystems'' which fail are implemented within androidvfs.c.