From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id qCbdAxmezmLqwwAAbAwnHQ (envelope-from ) for ; Wed, 13 Jul 2022 12:27:37 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id cMTgAxmezmKkQQEA9RJhRA (envelope-from ) for ; Wed, 13 Jul 2022 12:27:37 +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 CD3FB18817 for ; Wed, 13 Jul 2022 12:27:36 +0200 (CEST) Received: from localhost ([::1]:41824 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oBZae-0003om-Rk for larch@yhetil.org; Wed, 13 Jul 2022 06:27:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37174) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBZXG-00024w-TS for bug-guix@gnu.org; Wed, 13 Jul 2022 06:24:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:50609) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oBZXG-0008Mt-IL for bug-guix@gnu.org; Wed, 13 Jul 2022 06:24:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oBZXG-0001Uu-9Q for bug-guix@gnu.org; Wed, 13 Jul 2022 06:24:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#56503: Poor error message on missing file using substitute* Resent-From: Daniel =?UTF-8?Q?Mei=C3=9Fner?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 13 Jul 2022 10:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56503 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Maxim Cournoyer Cc: 56503@debbugs.gnu.org Received: via spool by 56503-submit@debbugs.gnu.org id=B56503.16577078215726 (code B ref 56503); Wed, 13 Jul 2022 10:24:02 +0000 Received: (at 56503) by debbugs.gnu.org; 13 Jul 2022 10:23:41 +0000 Received: from localhost ([127.0.0.1]:44506 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBZWv-0001UI-4p for submit@debbugs.gnu.org; Wed, 13 Jul 2022 06:23:41 -0400 Received: from out3.mail.ruhr-uni-bochum.de ([134.147.53.155]:24260) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBZWs-0001Tz-T2 for 56503@debbugs.gnu.org; Wed, 13 Jul 2022 06:23:40 -0400 Received: from mx3.mail.ruhr-uni-bochum.de (localhost [127.0.0.1]) by out3.mail.ruhr-uni-bochum.de (Postfix mo-ext) with ESMTP id 4LjYcN0Rrtz8SFx; Wed, 13 Jul 2022 12:23:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ruhr-uni-bochum.de; s=mail-2017; t=1657707812; bh=V1WnYgpYKvqex6hgeaIFKc/Etw6lHi+E5zQgM0VwGxM=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=JlqpC2S7H5G0OLroXtIc2kFpNPQUKyQCXgLe4tMbbiTebPM3G6G8g2+vN/ngvJaEg wQv+Ry1EUVbe6DGiucIrMA4mYjYJUd1IYGVQGUx/LSkfQemTKO7knRZvtKE3TsFTXK 8SLOycjDNK4JhZwkYMw+PLfk/33c3ycAxtZSLUuA= Received: from out3.mail.ruhr-uni-bochum.de (localhost [127.0.0.1]) by mx3.mail.ruhr-uni-bochum.de (Postfix idis) with ESMTP id 4LjYcM6pCHz8SFh; Wed, 13 Jul 2022 12:23:31 +0200 (CEST) X-Envelope-Sender: X-RUB-Notes: Internal origin=134.147.42.236 Received: from mail2.mail.ruhr-uni-bochum.de (mail2.mail.ruhr-uni-bochum.de [134.147.42.236]) by out3.mail.ruhr-uni-bochum.de (Postfix mi-int) with ESMTP id 4LjYcM5JCpz8SFt; Wed, 13 Jul 2022 12:23:31 +0200 (CEST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.104.1 at mx3.mail.ruhr-uni-bochum.de Received: from xii-04 (pm26.mg07.ruhr-uni-bochum.de [10.150.49.41]) by mail2.mail.ruhr-uni-bochum.de (Postfix) with ESMTPSA id 4LjYcM2g2NzDh1C; Wed, 13 Jul 2022 12:23:31 +0200 (CEST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.104.2 at mail2.mail.ruhr-uni-bochum.de References: <87r12r9txi.fsf@gmail.com> Date: Wed, 13 Jul 2022 12:23:31 +0200 In-Reply-To: <87r12r9txi.fsf@gmail.com> (Maxim Cournoyer's message of "Mon, 11 Jul 2022 18:16:25 -0400") Message-ID: <8735f51fbw.fsf@ruhr-uni-bochum.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" Reply-to: Daniel =?UTF-8?Q?Mei=C3=9Fner?= From: Daniel =?UTF-8?Q?Mei=C3=9Fner?= via Bug reports for GNU Guix 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=1657708056; h=from:from:sender:sender:reply-to: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: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=i4BDxCgqHk1vnsDwh6YS06ucw7Zm4qXY8d+UdE8rNqY=; b=XvOSMrJaf85gRK0mW6UkrNd7BTATA2BenZAKnYrVrN+4WPgE3HBc7heYIwbRRAsRu72aOy lxaB3qdZEI3NLaUo9BnkJsHZBJ0VT3ozF2Eo4Q8iQhrhL8rKvc4qNIMcP4DBMnwIuI7xiK 4UCcFXLlPGbv1XitbiQvBUbZqvstUB5rLWVZH2U/eY1dfUFNEOiGcSXjR14qXj0QrbmfCP TJSG3VcneUG6Z7iVVhT4Mmu4+NlhYitC55AU6BrzMd4fYxszytfD2l3u6FwuUpzIWF32gK nMlF2YpdJv7/1qslxocefQB5Fly+ifSVShkoXZYt0UXbPjR/nrM5/9TPEUPdwQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1657708056; a=rsa-sha256; cv=none; b=jbvAcQL0ReJdEK3tLFe2cXUuhJt1oaKO9oXEAN2p5E8Lkq3/A2YZ/jZ9hkzoQkqkATIU3L HAGBm8cHIqx8NvPl6T2KDmYG6Lfe6uwlYGC1RxKVFXzsVi99CewPCl9UjBcj/U3XzG2Ckr QRleyzpvWAZMryqtG66kBYEZgKknTdfs3M6Wg99RIArUv4JW3hNQOrcHcoUDZOm4UQoDDP IA8yvjgdYhCJBzCkUsFa5nJg8JsV6aWn2vAEt6Hf0LsHKWUUn7OzD6oNFF1az0fsCuoG8c 9s6+Nkwh7oSBlx2SGoy3NjPzfWSO8a/BxtNDSO9zfeQ9iDa5IbmGNTFPGc3FqQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=ruhr-uni-bochum.de header.s=mail-2017 header.b=JlqpC2S7; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.75 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=ruhr-uni-bochum.de header.s=mail-2017 header.b=JlqpC2S7; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: CD3FB18817 X-Spam-Score: -3.75 X-Migadu-Scanner: scn0.migadu.com X-TUID: iLbmqsq9A9qL Hi, Maxim Cournoyer writes: > When substitute* encounters a nonexistent file, the error is reported > to the guix CLI like so: > > [...] > > The main error message, "system-error "mkstemp" "~A" ("No such file or > directory") (2)" is malformed and doesn't report the actual file which > is missing; one must decipher the backtrace for clues as to which file > caused the error. > > We should improve it :-). I am Guix and Guile newbie but looking at the definition of the procedure =E2=80=98with-atomic-file-replacement=E2=80=99 I think we have to= catch the (possible) exception of the call to =E2=80=98mkstemp!=E2=80=99 and provide = a custom error message. This is because the exception thrown by =E2=80=98mkstemp!=E2=80=99 does not= contain any information about which file was tried. Try this snippet in a Guile REPL: --8<---------------cut here---------------start------------->8--- (with-exception-handler (lambda (x) (write x) (newline)) (lambda () (mkstemp! "/non/existing/path/foo.XXXXXX"))) --8<---------------cut here---------------end--------------->8--- It prints: --8<---------------cut here---------------start------------->8--- #<&compound-exception components: (#<&external-error> #<&origin origin: "mk= stemp"> #<&message message: "~A"> #<&irritants irritants: ("Datei oder Verz= eichnis nicht gefunden")> #<&exception-with-kind-and-args kind: system-erro= r args: ("mkstemp" "~A" ("Datei oder Verzeichnis nicht gefunden") (2))>)> --8<---------------cut here---------------end--------------->8--- So maybe this is a bug in Guile? Shouldn=E2=80=99t =E2=80=98mkstemp!=E2=80= =99 list the path in the irritants? Best --=20 Daniel