From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id SIwbGt4rT2Iw+gAAgWs5BA (envelope-from ) for ; Thu, 07 Apr 2022 20:22:22 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id GFfnEt4rT2LlYQAAG6o9tA (envelope-from ) for ; Thu, 07 Apr 2022 20:22:22 +0200 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 aspmx1.migadu.com (Postfix) with ESMTPS id 017E61E9AD for ; Thu, 7 Apr 2022 20:22:21 +0200 (CEST) Received: from localhost ([::1]:53154 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ncWlt-0001nL-1K for larch@yhetil.org; Thu, 07 Apr 2022 14:22:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33260) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ncWle-0001nB-Dv for guix-patches@gnu.org; Thu, 07 Apr 2022 14:22:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39478) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ncWle-00085W-2G for guix-patches@gnu.org; Thu, 07 Apr 2022 14:22:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ncWld-0001A5-To for guix-patches@gnu.org; Thu, 07 Apr 2022 14:22:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#54762] [PATCH] home: symlink-manager: Use no-follow version of file-exists?. Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 07 Apr 2022 18:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54762 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Andrew Tropin , 54762@debbugs.gnu.org Received: via spool by 54762-submit@debbugs.gnu.org id=B54762.16493556984436 (code B ref 54762); Thu, 07 Apr 2022 18:22:01 +0000 Received: (at 54762) by debbugs.gnu.org; 7 Apr 2022 18:21:38 +0000 Received: from localhost ([127.0.0.1]:33375 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ncWlG-00019U-HQ for submit@debbugs.gnu.org; Thu, 07 Apr 2022 14:21:38 -0400 Received: from laurent.telenet-ops.be ([195.130.137.89]:58848) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ncWlF-00019L-8P for 54762@debbugs.gnu.org; Thu, 07 Apr 2022 14:21:37 -0400 Received: from [192.168.174.254] ([188.189.131.219]) by laurent.telenet-ops.be with bizsmtp id FuMc270024kACEs01uMck1; Thu, 07 Apr 2022 20:21:36 +0200 Message-ID: From: Maxime Devos Date: Thu, 07 Apr 2022 20:21:35 +0200 In-Reply-To: <87bkxc6d5t.fsf@trop.in> References: <87zgkxxnvv.fsf@trop.in> <67cab598e57ecf7cf930d4b2d0568fd2f2f6f95d.camel@telenet.be> <87bkxc6d5t.fsf@trop.in> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-tJpv1/soHx1gg/cOYI7g" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1649355696; bh=Pme+SKW0V8ZuntbQoRbGfkfDxRBN2gphyPY46g2Pr58=; h=Subject:From:To:Date:In-Reply-To:References; b=bOnm7PDospDcnss2MNwpoGJKrkBpeYmd9dttf2B9RYe9RUQt1gEEIK6tZEmOOXCL8 j2cq37UF/PxbXpAj4/hYK/BnSnu7DmL2SV1KLf4FUSj7d8RkClNF1cILJIYV2qeZoj aLHA+iUBjsAjcXht5AMJ4mqHiQnzx48o1u4CnmDc03yAEJY5GXgxz/ffzw5XwuMdt6 lYuUcsBcobHH71SoonXMn2yn5wARb31XbqKw9KP9bkNH0lgR7WfvK8fCrVRB59Dsj0 aS+TuxHlB+25r/HRbokCHtG5ONR7+mQGlWFvugF8qCGsidtNkcz11rWnFZnVnYjJxz e/s1QqoEBKmlQ== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1649355742; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=Pme+SKW0V8ZuntbQoRbGfkfDxRBN2gphyPY46g2Pr58=; b=CgDqNoAxguRkTv7xuj5PhI8LPW9L25aeoUGFOvA5VXkMnQzxBBMYLgbn5Tvy1yKK9yFop9 8uiUMaYEEZqwj5pWo+EiwLAGqE5V+GVFpC8nEHIrf0+73Xtr14ncPcIKj2sL2kI3ixHMvI VxubRwW0GN9Vf8/1LZVF4DaCOI0Qdd52/jbyEa1MF2THJlUEy74FQxB3/FTmBa4G4ljD4e Jc5WApAnli6RsjjQyvvgkCGmCxbMIGIeKHugxFY4qJL6a8vEc/KQ+xX0zUyx8omc+/0cql a94MmNDcyPWjEuL3BY5e4sMk+nzgpFsSACJxcKsLSmmKnx/rhcYiHWTxTZZ1mA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1649355742; a=rsa-sha256; cv=none; b=aE97nywTbveIJzpcR6CYfNKhIoUEZa2VIZHXy+JUqr/csl3RSN1fOqFXOslQCELYtFuycs ImHxKeHP5VFVtq+ZrbJRbJYcqluNzz19UJduxMWXx1RVgQVZbLMf5PWtRm1mCuW0dQDf+c CwEoB9ZZCS4yfOukMh15j6QWGrZXg7mJcLsgmvTbW4ru2rkcAf9mdnKBCRuw7iIw5JvhLq CwWxKMmgrIb9KTe22LpPPaJrGrxa01ldGrw7Z60yZVNDKzzKN/imAhmMxbdtZ9xOPHFFjD 3vPjEAzeLPUWFHZOcNuK2Uw6AVRSiF60MyMSZFcIF2MFpZbhhBXvVLz5iy2nHQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r22 header.b=bOnm7PDo; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 2.54 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r22 header.b=bOnm7PDo; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 017E61E9AD X-Spam-Score: 2.54 X-Migadu-Scanner: scn0.migadu.com X-TUID: Yg/uX12XvT55 --=-tJpv1/soHx1gg/cOYI7g Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Andrew Tropin schreef op do 07-04-2022 om 20:01 [+0300]: > Idk how file-exists? works internally, but still expect it to be more > efficient than lstat.=C2=A0 That's why I decided to use lstat only as a > "fallback" option in `or` statement. Here's the definition, from module/ice-9/boot-9.scm (Guile source code): ;; For reference, Emacs file-exists-p uses stat in this same way. (define file-exists? (if (provided? 'posix) (lambda (str) (->bool (stat str #f))) [non-POSIX code that's not relevant to Guix])) 'file-exists?' just calls 'stat', a variant of 'lstat', so I don't think there are performance gains to be had here. Well, the (stat ... #f) might not need to install an exception handler since it is written in C, but that seems at most a micro-optimisation to me. Greetings, Maxime. --=-tJpv1/soHx1gg/cOYI7g Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYk8rrxccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7mNOAP9zSC/W3+lRrOEHQR+3zx3iOIw2 rofk1b43hgEAXNwzMAD9F0dT09a4yVZeHY6YbIRyBAoD8TTqpclCZ9cdindzOQ4= =Mrny -----END PGP SIGNATURE----- --=-tJpv1/soHx1gg/cOYI7g--