From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id +GLFKpFhmmKR4wAAbAwnHQ (envelope-from ) for ; Fri, 03 Jun 2022 21:31:29 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id gMq3KpFhmmIZ+gAA9RJhRA (envelope-from ) for ; Fri, 03 Jun 2022 21:31:29 +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 87BDCE67F for ; Fri, 3 Jun 2022 21:31:29 +0200 (CEST) Received: from localhost ([::1]:48716 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nxD16-0004wR-LE for larch@yhetil.org; Fri, 03 Jun 2022 15:31:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56916) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nxD0I-0004wG-AE for guix-devel@gnu.org; Fri, 03 Jun 2022 15:30:38 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:60374) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nxD0G-0002Wl-RQ; Fri, 03 Jun 2022 15:30:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=60laRS5m9Ks1ssY3m1JYKWd4t6gnOzP9pAjXyjrJuaA=; b=OhYkby++ytcOuXB8kLBc M9yjzTit3zPnB0eaUjKruwwOSI+qQ4Xz6EwOuUzi4lPkgW6cTQHRb2/wQj99G4AOwPRjajHgwDSj6 LlOuQ26zIS0Ltsgprpv5DcEgwnvSdrteHhvj4g99k2vFseQ6S7cJLzsAkh1uZXd870aD0v5+qlqV6 691jcHtIj7/2hp3qaNq4WWVV9t+1rQLEEyfPAaYD80/wKErumdKAEUXgffWsB4mhqmpzbQKBVcgLM rPgsQqdY4wRQ+ZJcttu6tWOK6kkWQf4EctIrCOBteux3oQP+vtUUwKKDGgOfJ1af/jKM/IYoHGWH9 zQElUd1ft9Uv9A==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:54968 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nxCzp-0001KQ-Fk; Fri, 03 Jun 2022 15:30:34 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Maxime Devos Cc: Arun Isaac , Guix Devel Subject: Re: Move switch-symlinks to (guix build utils) References: <87pmjsdeh7.fsf@systemreboot.net> <72a63d9badd632af81adb75b66cd95d9c05bc31a.camel@telenet.be> <87ee07cdfn.fsf@systemreboot.net> <8735glk8gs.fsf@gnu.org> <2c194c3b2f192ba49caaf585703f95b6c6bcb7d9.camel@telenet.be> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Quintidi 15 Prairial an 230 de la =?utf-8?Q?R=C3=A9v?= =?utf-8?Q?olution=2C?= jour de la Caille X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Fri, 03 Jun 2022 21:30:04 +0200 In-Reply-To: <2c194c3b2f192ba49caaf585703f95b6c6bcb7d9.camel@telenet.be> (Maxime Devos's message of "Fri, 03 Jun 2022 19:09:02 +0200") Message-ID: <87ilphilz7.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" 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=1654284689; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=60laRS5m9Ks1ssY3m1JYKWd4t6gnOzP9pAjXyjrJuaA=; b=scY9czGx2O6bWQRAUbl88H4Ns8loJpHAceRfzeXD10vAxKo4pzH8mZbkZAoKbrC8Khi3S5 sDQt/0Mp+Q4Evtc/u7LX60gCH4acXDQoR8AD6liY5dSRq93aJx+dRP7ZqrSoWdIDM5MiK5 /W/2FgI8hQZ09zZbwET0c3BCeCvll/FrJwmB6TQGhfmG1+Yl2ZYjIGNWaLu5ty7N/WpolS LOmJYsGL8OL4t4iXRD/lIfrNScLM5UH0oO28nFikwOLL62OrTp0KjVstmHVkWx5d6HTDTE kcsxG/QN5y5mPUgHldotRcBWSA1p9CiUuYv+7yGKI4Z/1I+lZUFD4FA/DLg7Vw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1654284689; a=rsa-sha256; cv=none; b=FEisMKPa2jHo1e1NWgP1dR+8MnU4ZWhEA7TrezKmknl7o3Qg24UTgeTc6R57w2CpNNaZeU ibqAtMqQ2HeJT5Dvdty3xeH4rJS+peFWFFc7r4GWA891Wl6DwaRQHewvdRh2Z5F8LpMc34 tO3iFId+iuQBLeLGHOkl3TIteBU2M+c4QgGb+pP1bbbwavtNYJoIZ4AfLa24WH9yJC9asR fY8fzCMslE/Bxna1LFfI0t1xwR1nY7TbGY+7PpFTTkxE225j9WbfscDVj0nDDow3ss9qQH NPheCk4TkQROwlmEpMsLekrFSlNODLmVPaWyT6vKpRmI1Ai7SdLf9WW3NGG4Eg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=OhYkby++; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -6.22 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=OhYkby++; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 87BDCE67F X-Spam-Score: -6.22 X-Migadu-Scanner: scn0.migadu.com X-TUID: BWSjNO5LL0YP Hi, Maxime Devos skribis: > Maybe replace > > (symlink target pivot) > > by (symlink/remove-old target pivot) > > where > > (define (symlink/remove-old target link) > "Make a symbolic link named LINK pointing to TARGET. > If LINK already exists, it will be removed first. > This is not an atomic operation." > (catch 'system-error > (lambda () > (symlink target link)) > (lambda stuff > (if (=3D (system-error-errno stuff) EEXIST) > (begin > ;; remove old link and retry > (delete-file link) > (symlink/remove-old link target)) > (apply throw stuff))))) Alright, SGTM (this procedure would be kept private). So Arun, the floor is yours! :-) Ludo=E2=80=99.