From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id kAoABphww2UjdAEAqHPOHw:P1 (envelope-from ) for ; Wed, 07 Feb 2024 12:59:20 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id kAoABphww2UjdAEAqHPOHw (envelope-from ) for ; Wed, 07 Feb 2024 12:59:20 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=lvdwiw2P; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none); 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1707307160; 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: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=8pRKWKosP6ie6gRrRveyNrwFt/0lkCql4rIfdjhkD9k=; b=U38eOWOYGlgtya1if23N7IyXJe2xp9Q3GTkfo6UFxEsjd27b9ho0xHPkbaJXv9KkjBIThm jYRx0aPLQc1LFBpCYSvgmdyyZxmoJmXNFPopksfouBQGvrep4S/bDENzefg80uZ6Q+yYbZ xT5/Gy5Op0vQl99t4b4UVBSGfi41UCMmfl8Gd/5q0/pNdOu3Qvq5g8o755snrgyjjdSSCI jmyG4Knd6QfQ8tBX3QwwgK/XWqmJaahOLeiK79WR/lRtfgGtU+x6o+WluX8XX9bcmhsGZG 5Glm1GGei1fDKoVzfk5SUpm3GbDy/VXkW9jj/13xHhDanmpCX89FvAfxUiQcDA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=lvdwiw2P; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none); 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1707307160; a=rsa-sha256; cv=none; b=Q7UAcaoQzrWWvQ2gmnsxHQouJf6++YFIsFbsvc0JjWc9btJ7cDmPykhMeLWAUcZIiHMRDL 4hLvIL9gFohcCxUkdPmb0T+J9J+HcmsNHy8nhKj53Uf8envu9x2E/UPET+Ot1WX84KZbgW k9M87fdP581byGKsOIGpoN6hhJ1rxj15kfVbkycisqF1gaMM99ZEInE6pzRGKe2uksJ3yd uzzMBf3vhj+m6L6g19FnkxxMnilxcCIz+BJC+PU39M5FO0mqY+FVXspzBEoyJYqhKw2umh 0x/pJkniiKtSoX+eGNKskIX0vEjHvowYP81PkFkl77FDC0q/OdcJm2yagAFBAg== 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 E4EAB1248B for ; Wed, 7 Feb 2024 12:59:19 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rXgZm-0008OV-Gi; Wed, 07 Feb 2024 06:58:50 -0500 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 1rXgZk-0008O3-SK for bug-guix@gnu.org; Wed, 07 Feb 2024 06:58:49 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rXgZk-0008F0-KI for bug-guix@gnu.org; Wed, 07 Feb 2024 06:58:48 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rXgZy-00062A-2O for bug-guix@gnu.org; Wed, 07 Feb 2024 06:59:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#68968: system reconfigure ignores incorrect --on-error flag value Resent-From: Michal Atlas Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 07 Feb 2024 11:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 68968 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 68968@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.170730708823130 (code B ref -1); Wed, 07 Feb 2024 11:59:01 +0000 Received: (at submit) by debbugs.gnu.org; 7 Feb 2024 11:58:08 +0000 Received: from localhost ([127.0.0.1]:55807 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rXgZ5-00060y-BU for submit@debbugs.gnu.org; Wed, 07 Feb 2024 06:58:08 -0500 Received: from lists.gnu.org ([2001:470:142::17]:55708) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rXgQ7-0005lV-VU for submit@debbugs.gnu.org; Wed, 07 Feb 2024 06:48:52 -0500 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 1rXgPo-0006GY-EN for bug-guix@gnu.org; Wed, 07 Feb 2024 06:48:32 -0500 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rXgPm-0005bQ-KN for bug-guix@gnu.org; Wed, 07 Feb 2024 06:48:32 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id EEC7A240027 for ; Wed, 7 Feb 2024 12:48:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1707306507; bh=GjfGVdbbYRfYFQU++uRsKaRaRkuSjT1DumzBVvpu5q0=; h=Message-ID:Date:MIME-Version:To:From:Subject:Content-Type: Content-Transfer-Encoding:From; b=lvdwiw2PitY7jf+/KHSxuZUyq9P45sSpXK/jHM8oTYV2K7PnuMWtl+mkwOVVNBvSB BlkBvfvK7lcau6zeEXv1sl5mGVmho56xdhD3mQffJFqYA3cLK5YNhe+u2NEczmKexv xXMRa1mb3KymbWqDR6TvBeNssEsjRAY05nlAYjcNswXcF3c3NC9lYbAlu8kE8Aqyw+ ApDC643w625QwFP81NcNLmQ6quCxwg1e3v1rUKfrAiDUqGWn8g08zEZyLhBR8knX3h McN/TgilkJBM2DvpyFsW9I1zhjWMsCr5CdvZf2en9FVTRJbBXgSTbSuE68h9G8am0B UN4tUCAvXDOGg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4TVJKQ2lvjz6tw6 for ; Wed, 7 Feb 2024 12:48:26 +0100 (CET) Message-ID: Date: Wed, 7 Feb 2024 11:48:25 +0000 MIME-Version: 1.0 Content-Language: en-US From: Michal Atlas Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=185.67.36.65; envelope-from=michal_atlas+gnu@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Wed, 07 Feb 2024 06:58:07 -0500 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: 2.13 X-Spam-Score: 2.13 X-Migadu-Queue-Id: E4EAB1248B X-Migadu-Scanner: mx12.migadu.com X-TUID: 5mZlYAIe4xpp In the guix/scripts/system.scm file we do not check the value while parsing the flag: --8<---------------cut here---------------start------------->8--- (option '("on-error") #t #f         (lambda (opt name arg result)           (alist-cons 'on-error (string->symbol arg)                       result))) --8<---------------cut here---------------end--------------->8--- and then blindly pass it to load*: --8<---------------cut here---------------start------------->8--- (load* file %user-module #:on-error (assoc-ref opts 'on-error)) --8<---------------cut here---------------end--------------->8--- and load* uses it in a case that only gets called when an actual error occurs and treats the correct symbols but has a default clause that silently ignores values other than debug and backtrace: --8<---------------cut here---------------start------------->8--- (case on-error ((debug) ...) ((backtrace) ...) (else #t)) --8<---------------cut here---------------end--------------->8--- meaning that for example a typo such as `--on-error=stacktrace`, gets treated as if the flag was not passed at all. Minimum replication: --8<---------------cut here---------------start------------->8--- guix system build <(echo x) --on-error=stacktrace guix system build <(echo x) --on-error=backtrace --8<---------------cut here---------------end--------------->8--- I'm not sure where the check should be done, nor what would be an acceptable way to not duplicate the list of valid values between guix/ui.scm and guix/scripts/system.scm