From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id sCUPOTDwJmWmEgAAG6o9tA:P1 (envelope-from ) for ; Wed, 11 Oct 2023 20:57:53 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id sCUPOTDwJmWmEgAAG6o9tA (envelope-from ) for ; Wed, 11 Oct 2023 20:57:53 +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 16C834697C for ; Wed, 11 Oct 2023 20:57:52 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=owlfolio.org header.s=fm1 header.b=S4hZzARq; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm2 header.b=TbPqvn2+; dmarc=fail reason="SPF not aligned (relaxed)" header.from=owlfolio.org (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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1697050672; a=rsa-sha256; cv=none; b=bJRNrdT6+eZIUWDE5Ff/9JsXULG/eYnLFqK2kLKOzdUfjEuLiff63hKwYRWnjqU6kh/NqI 5/49z6hAGOTSGpEtoOIBiLAsMVgBTkhTKV2zqtVYHqcSz8P+Mqn99OMC8KDG3+PR22zFgU 0WlCg+66I7sxPBCMj7vTY5NqQKY5lE0fRDs0KXJ5mUBYov3E/jWGIZbErTKJmhYKMv79lV v8eFjSHRgueuSjrrJ9dWN3WauwdwMjq0+rMQG+dwSv1S3iJXafzDQSwdBi3jwsNLvlwtY5 TbQWMBpZNdlO0BgBawJfXlgELI9y25T+o3zhabpzC49vT0FsJ8oFdUQb4oGWSA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=owlfolio.org header.s=fm1 header.b=S4hZzARq; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm2 header.b=TbPqvn2+; dmarc=fail reason="SPF not aligned (relaxed)" header.from=owlfolio.org (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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1697050672; 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: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=OiUGeGy0KjtupERpLhE2HKvJIELuo4H2NUme5WzTk6I=; b=TSGPjWdbSxsmD4SgnbaQG2uc9BN7wnnSPKf77OiTRb8hYAi3IHnXyKTDpGXTChiBC2TmCR 8M8A8bChlstTTXhqUYbSq0NFyYEON19NczXl/eQuY9ru/zUeT4SNtLlqnSZelWSHa/Ota8 tEbG8BippapPCTdFu9hlSB/xRyw/TzN2QuPyVdTdHhVGCullDTyC3W0edh11d9QPFg/KHu xnh7aNShXCum7RRngcLHW6U6RSxvD+FxxAxc+5ec57cKQuwunHUyzf3JvtYxULP1Fsbn01 3buNFm+gccIpCG4WfD6ko4pYUrIqJum4XV6QCnJeII4SPRRYpVN0/+F015CZMg== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qqeOt-0000Eo-51; Wed, 11 Oct 2023 14:57:43 -0400 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 1qqeOr-0000Ce-9v for guix-patches@gnu.org; Wed, 11 Oct 2023 14:57:41 -0400 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 1qqeOq-0006Ir-SJ for guix-patches@gnu.org; Wed, 11 Oct 2023 14:57:41 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qqePC-0001Ow-I9 for guix-patches@gnu.org; Wed, 11 Oct 2023 14:58:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#64359] [PATCH] [RFC] --search-paths: emit code compatible with set -u Resent-From: "Zack Weinberg" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 11 Oct 2023 18:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64359 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 64359@debbugs.gnu.org Received: via spool by 64359-submit@debbugs.gnu.org id=B64359.16970506715363 (code B ref 64359); Wed, 11 Oct 2023 18:58:02 +0000 Received: (at 64359) by debbugs.gnu.org; 11 Oct 2023 18:57:51 +0000 Received: from localhost ([127.0.0.1]:40078 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qqeP0-0001OR-HN for submit@debbugs.gnu.org; Wed, 11 Oct 2023 14:57:50 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:50441) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qqeOv-0001O2-5s for 64359@debbugs.gnu.org; Wed, 11 Oct 2023 14:57:48 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 13EC15C0298; Wed, 11 Oct 2023 14:57:17 -0400 (EDT) Received: from imap45 ([10.202.2.95]) by compute5.internal (MEProxy); Wed, 11 Oct 2023 14:57:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=owlfolio.org; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm1; t= 1697050637; x=1697137037; bh=OiUGeGy0KjtupERpLhE2HKvJIELuo4H2NUm e5WzTk6I=; b=S4hZzARqasHWYA587UwtG+ylXKrLvWV8Af23tCAVkcu3jYwcWyk CJeyTIWbCzY6ns/YCRq/uOVkCaMJp90AhloAIRrOPWqxzMcjghmXdeI1/ccJQtim h6Ct5t9uspiLDATDDDn5Z2j8fD6RdM4yNau6wOlpDOqvHTL+HY+gxjevCAbPn8f9 0oqcJJDurz9bNcyCz/Lt2JOt6604ux+3eZSrGgM06U1EyQveheqwVel1WaQvIWVX L5Q31MO4XbOqA9e7s0SZLQilbbkgaI78gDYqpGFDmF6yyAbyebr+2b+DbBe0ZLu5 N+TnWjEhVRHmzgdPThZl9h6abP4JszQ8NHw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1697050637; x=1697137037; bh=OiUGeGy0KjtupERpLhE2HKvJIELuo4H2NUm e5WzTk6I=; b=TbPqvn2+Yl/S5U3L7eMgMzy2oo2EYBFspzyrA3YFj1P5xt+vUKn tv6NrcyxtlxPpa+bNJi2Wx6eskoaj8MGGh52hdg7x3B8sA0ZWgH/+r7SXEmEMSHC /jjYEHQyaMaLi4VDRm2MHqJWqwiPF2+95fk7PV8CfbqOC5u+qM+FHsh1G2UFe8Wh 3cMiGEkmShwUIPpiDvY2E5baCWBZLAZ2QcyGO53BgHpqXFwfqYbmCIjsFkTUd/15 pJNy1uAkxLKkfShZX5T8cooWMxvgRc5wG47HpFs3OfLd+jW1cUopQtsbdKsOWOS/ 0OgeGFGYQjMyzA8shY5K6k1sC8d3BxnBMog== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrheekgdduvdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtgfesthhqredtreerjeenucfhrhhomhepfdgk rggtkhcuhggvihhnsggvrhhgfdcuoeiirggtkhesohiflhhfohhlihhordhorhhgqeenuc ggtffrrghtthgvrhhnpeduueeigeehffekiefhtdehiedvueffteevtefhudfguedtueei tdetgfetieeiieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpeiirggtkhesohiflhhfohhlihhordhorhhg X-ME-Proxy: Feedback-ID: i876146a2:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id A99FD272007B; Wed, 11 Oct 2023 14:57:16 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-1019-ged83ad8595-fm-20231002.001-ged83ad85 MIME-Version: 1.0 Message-Id: In-Reply-To: <87bkd5t7fr.fsf@gnu.org> References: <877crlyidb.wl-zack@owlfolio.org> <87bkd5t7fr.fsf@gnu.org> Date: Wed, 11 Oct 2023 14:56:55 -0400 From: "Zack Weinberg" 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: 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx1.migadu.com X-Migadu-Spam-Score: 2.69 X-Spam-Score: 2.69 X-Migadu-Queue-Id: 16C834697C X-TUID: ax9XiTFP4ePi On Wed, Oct 11, 2023, at 1:06 PM, Ludovic Court=C3=A8s wrote: >> This patch makes the code emitted by --search-paths compatible with s= et -u, >> by changing each use of bare `$VARIABLE` to `${VARIABLE:-}`, e.g. >> >> $ bash -c ' >> set -u >> unset PKG_CONFIG_PATH >> export PKG_CONFIG_PATH=3D"/example/lib/pkgconfig${PKG_CONFIG_= PATH:+:}${PKG_CONFIG_PATH:-}" >> echo $PKG_CONFIG_PATH' >> /example/lib/pkgconfig > > This change makes a lot of sense to me. Glad to hear! >> +++ b/guix/build/utils.scm >> @@ -1384,19 +1384,19 @@ (define (export-variable lst) >> (format #f "export ~a=3D\"~a\"" >> var (string-join rest sep))) >> ((var sep 'prefix rest) >> - (format #f "export ~a=3D\"~a${~a:+~a}$~a\"" >> + (format #f "export ~a=3D\"~a${~a:+~a}${~a:-}\"" >> var (string-join rest sep) var sep var)) > > This part is a full-rebuild change, so it=E2=80=99d have to wait. How= ever, it=E2=80=99s > within =E2=80=98wrap-program=E2=80=99; the script generated by =E2=80=98= wrap-program=E2=80=99 does *not* > use =E2=80=98set -u=E2=80=99, so I think this change is unnecessary. = Am I right? It's not strictly necessary to fix the bug, no. I made this change beca= use it's the only other appearance of 'export VAR=3D"additional-value${VAR:+= :}$VAR"' in the guix source code and I thought it would be better to change both = of them the same way. If only so that years from now someone doesn't waste = any time wondering why they're not quite the same and whether it matters. Why is it a full-rebuild change? As you point out, it should not actual= ly change anything? >> --- a/tests/guix-environment.sh >> +++ b/tests/guix-environment.sh > You can remove this change and keep only the =E2=80=98tests/guix-shell= .sh=E2=80=99 part. I know "guix environment" is obsolete, but isn't it appropriate to test = it thoroughly for as long as it still exists? (and again, years from now s= omeone might waste time wondering why this is only tested for "guix shell") zw