From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hartmut Goebel Subject: Re: environment variable handling cleanup ? Date: Mon, 23 Mar 2020 09:54:57 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:49417) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jGIrR-0001R9-2n for guix-devel@gnu.org; Mon, 23 Mar 2020 04:55:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jGIrQ-0005q4-12 for guix-devel@gnu.org; Mon, 23 Mar 2020 04:55:04 -0400 Received: from mail-out.m-online.net ([212.18.0.9]:33587) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jGIrP-0005nj-QK for guix-devel@gnu.org; Mon, 23 Mar 2020 04:55:03 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 48m7Vr4qK3z1qs38 for ; Mon, 23 Mar 2020 09:55:00 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 48m7Vr4jNSz1qqlF for ; Mon, 23 Mar 2020 09:55:00 +0100 (CET) Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id XbuIItQt0tXm for ; Mon, 23 Mar 2020 09:54:59 +0100 (CET) Received: from hermia.goebel-consult.de (ppp-188-174-88-133.dynamic.mnet-online.de [188.174.88.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS for ; Mon, 23 Mar 2020 09:54:59 +0100 (CET) Received: from lenashee.goebel-consult.de (lenashee.fritz.box [192.168.110.28]) by hermia.goebel-consult.de (Postfix) with ESMTP id 340DB601E8 for ; Mon, 23 Mar 2020 09:56:39 +0100 (CET) In-Reply-To: Content-Language: en-US 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+gcggd-guix-devel=m.gmane-mx.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org Am 22.03.20 um 15:40 schrieb Vincent Legoll: > as I'm trying to ramp up my scheme & guix -fu, I'm wondering if > something along the lines of : Well, I did not count how often this is used, but (guix built utils update-env) might benefit from this, to. > There's also the added (or (getenv ...) "") which is not present in > all target cases. I suggest to default the value to #f (False), since - depending on the variables semantic - it may make a difference whether the variabel is empty or actually unset. This is especially true when used within a programming language like Scheme which has a notion of "False" - which env-vars do not have. > Another question is the usefulness of the separator parameter, > as I think all target cases use ":", so hardcoding it would be a > sensible choice. I doubt there Is a need for different separators The path separator is defined to be ":" in Posix. So I'd suggest to use a hardcoded value. -- Regards Hartmut Goebel | Hartmut Goebel | h.goebel@crazy-compilers.com | | www.crazy-compilers.com | compilers which you thought are impossible |