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 ms0.migadu.com with LMTPS id aDN0Nj7qQWIp8QAAgWs5BA (envelope-from ) for ; Mon, 28 Mar 2022 19:02:54 +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 2CjfMz7qQWKJIgEA9RJhRA (envelope-from ) for ; Mon, 28 Mar 2022 19:02:54 +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 98F20E95F for ; Mon, 28 Mar 2022 19:02:54 +0200 (CEST) Received: from localhost ([::1]:56742 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nYslZ-0000cz-Ml for larch@yhetil.org; Mon, 28 Mar 2022 13:02:53 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39960) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nYWFH-0004hg-3N for bug-guix@gnu.org; Sun, 27 Mar 2022 13:00:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:34356) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nYWFG-0008Mr-Q3 for bug-guix@gnu.org; Sun, 27 Mar 2022 13:00:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nYWFG-0005uC-Ow for bug-guix@gnu.org; Sun, 27 Mar 2022 13:00:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#51466: [PATCH 0/1] environment: properly parse environment variables during --check References: <87r1c5c6gk.fsf@ponder> In-Reply-To: <87r1c5c6gk.fsf@ponder> Resent-From: Kevin Boulain Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 27 Mar 2022 17:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51466 X-GNU-PR-Package: guix X-GNU-PR-Keywords: moreinfo To: 51466@debbugs.gnu.org Received: via spool by 51466-submit@debbugs.gnu.org id=B51466.164840036722618 (code B ref 51466); Sun, 27 Mar 2022 17:00:02 +0000 Received: (at 51466) by debbugs.gnu.org; 27 Mar 2022 16:59:27 +0000 Received: from localhost ([127.0.0.1]:56484 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nYWEg-0005sk-Sx for submit@debbugs.gnu.org; Sun, 27 Mar 2022 12:59:27 -0400 Received: from mail-ej1-f47.google.com ([209.85.218.47]:45970) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nYWEe-0005sP-KZ for 51466@debbugs.gnu.org; Sun, 27 Mar 2022 12:59:24 -0400 Received: by mail-ej1-f47.google.com with SMTP id qa43so24183994ejc.12 for <51466@debbugs.gnu.org>; Sun, 27 Mar 2022 09:59:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=HMv6W3L7ceA9jgGujKkPJEk+ywO4NmuCvCH4hYA0LQA=; b=CCIfhwlT43bknIlEJjWSOackGvViA9guC9AgnKBUR5TAybZ3KoORmw/H452xcwsWM6 LgOGxsAAx72lg6AAQSvLKDyViT8sW/y10winsMhAAlbl3FrOyeCl/OOGls9LP+1LZX2M MFMKTUa8JufOc7QVqXlA1tzizhSSNV/gEpMAdEsAqFkaYeTBw46VLO4ZC3LjEsCwjWBL 1nywyN0c9yHGr7EUL1uOIToOIoXUMjMgYcWNPcxwSsg3QI16DXwiA1K8sR629RdbubYI WCRnlIApWaq8B3QIc4NTDTgnla7Rk6r3Y4VlSpaqnSYhShyQp7fSIsE6qZPKuhmRPEDq C1wA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=HMv6W3L7ceA9jgGujKkPJEk+ywO4NmuCvCH4hYA0LQA=; b=JEF1IwfEoFljvRoA2LZSL/Jcm/3WPe6z+Ejj4NoMai9SM3dW50OiEPNRmZl/Cx7EAq Lc5cFEu06qTl6vux3BOZZ+ZW0JD22Obvt4PCrkBVvVan2ff1LcCFsVZYkKHaWwrbtNKB xLlbVgFWVt6yvGVSVIQuHSMtckxe1C99i+leJpiO2Ao+loocHONXV2XTfekbPYXQB+3r apjMXh1Sfs8HgPJj7cLlzFgtuMTEGx0H8qX+6/bChYhbky67EaGWxs0FZNFmPzLgvzDd 1/iAxa06GrFWFGgwhgicKo7qnyzs7EK9tMJXTdPPj+XG9oaJ+Gfq7xdisU9wX2Nvk8Q6 GNOg== X-Gm-Message-State: AOAM5321Njv8C8htBZfh+ZUu++DfD+sm2MqRUf3MzEg/6AK3KTPaYP1q SrbQnKDSpq6ANv84lqfxg6PzK90k5Ps= X-Google-Smtp-Source: ABdhPJzze2ebTKOzH0ezI+GEaLA/Xj9O87i1kYPeQ/M/bD8j/oeGzLW+WEH22NFTra2LuuPJLWq3xA== X-Received: by 2002:a17:907:7ba6:b0:6df:ee7d:10f2 with SMTP id ne38-20020a1709077ba600b006dfee7d10f2mr23308594ejc.98.1648400358368; Sun, 27 Mar 2022 09:59:18 -0700 (PDT) Received: from localhost.localdomain ([51.154.70.17]) by smtp.gmail.com with ESMTPSA id q2-20020a170906144200b006ceb8723de9sm4786243ejc.120.2022.03.27.09.59.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Mar 2022 09:59:17 -0700 (PDT) From: Kevin Boulain Date: Sun, 27 Mar 2022 19:01:23 +0200 Message-Id: <20220327170124.2846-1-kevinboulain@gmail.com> X-Mailer: git-send-email 2.34.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Mon, 28 Mar 2022 13:02:19 -0400 X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Boulain Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-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=1648486974; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: 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=HMv6W3L7ceA9jgGujKkPJEk+ywO4NmuCvCH4hYA0LQA=; b=hDdy37cdFETbazbYk8lTmwCbK4iQKYWLFHkFC+yre14c8Z4097LhMh4jRK/8OBJp8+28ZD FAaWlfZPaOyiKZqzPlswDE/soHsDZvbc5aFQryeeoZQg3wYKnZIKgolmAOipJlnF0s8vhQ M/p0brEyzpQKqJ4FyHZyPCWqtgh8GeWB0fasmYzea4fZAFDpJW2LPAB8vQyiLkWRXeEn7c 5dA7UYOc/7ef4mUQ4hrR6Ng4+rBAVebV72Mzbdj4YbhduuhMRVtahOElY3ezfIWFNJ5o20 cGy0Alg0AZBZ9quMj6w3bY/nuAcI6WdS1rhuUQ2Vrv3TKkaOFHkIJSO546DEXA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1648486974; a=rsa-sha256; cv=none; b=ePZ+/+LUVMfeU+D8C3c4P+q9wlzNOgHXI8WLK/jZpNz8FrCLf+DgxiVC/bLA9txrJ3gW3F v+xyZQDOnV0VKk1QxyaXHzP/vL/1CSy1iVREFNLlPHUjjc/jBF8ILpf5M5AnYIz60mEGcQ mGKi/B6IgJLAJkK2+0nYS2MXysiwoYP4bVpPSD33oLksKH+NyQ/58TNC0MhlI3itj/AwJA tcgIAg2/FemBNKwyds6FWKbfGgjYgLuyQzyY/YtzXDlG5S+P8uFf6Bt0AQ1/IL1R1Ki4kB kOb6wsdloICHgb379hzYyhjy43C5C9KaaECWqnCEI16vhK1MapfJKr+Pel5UAg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=CCIfhwlT; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (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" X-Migadu-Spam-Score: 7.43 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=CCIfhwlT; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (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" X-Migadu-Queue-Id: 98F20E95F X-Spam-Score: 7.43 X-Migadu-Scanner: scn0.migadu.com X-TUID: 63ofhfRqjG9y The PS1=; for i in 1 2 3; do echo GUIX_FLUSH_$i; done; hack appears to work for me but here is my alternate version. I don't think we have to hack our way around the shell if we can dump the environment variables somewhere else. I added a test but the potato machine I'm running that on is taking a very long time to run the whole thing (I did run the test in isolation with and without my patch), would you mind checking it works for you (and can we use Bash there?). Note I'm still not sure why we have env || /usr/bin/env (in case we mess with the PATH I guess?) so I've kept it. Comments welcome, I haven't coded much in Guile/Scheme. Kevin Boulain (1): environment: properly parse environment variables during --check guix/scripts/environment.scm | 65 +++++++++++++++++++++++------------- tests/guix-environment.sh | 16 +++++++++ 2 files changed, 57 insertions(+), 24 deletions(-)