From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DFBD3C433EF for ; Tue, 19 Oct 2021 16:45:13 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E97AD61175 for ; Tue, 19 Oct 2021 16:45:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org E97AD61175 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6BB9D829FC; Tue, 19 Oct 2021 18:45:09 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="bWujjlkW"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 393CA8119C; Tue, 19 Oct 2021 18:45:05 +0200 (CEST) Received: from mail-qt1-x82a.google.com (mail-qt1-x82a.google.com [IPv6:2607:f8b0:4864:20::82a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id B209A82DF7 for ; Tue, 19 Oct 2021 18:44:53 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qt1-x82a.google.com with SMTP id o12so518002qtq.7 for ; Tue, 19 Oct 2021 09:44:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=vDdnRPbSnVPQ+kjeAqUk4c5jNRjsqkDjHv2OQqlzdCw=; b=bWujjlkWFro6HOXek1XJMKI1Av++TDbJ6DOpUe0/YLOYXwSd8ZtCMddvdsFWu69f7D LDXUES8Bhq0cCI5JndpDHy+2+lQVBEZY3bB73lWA7h3LxankXCotRhRvJfbuPGRfQ9Zd qdsPwd3JUC6h6ffSSfWsyt9mgydqq8Ql1XpY0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=vDdnRPbSnVPQ+kjeAqUk4c5jNRjsqkDjHv2OQqlzdCw=; b=rccPVfgPVO4IFINbW9DeI3++kcMoMisPLNOJvaDMhpUbLpaZ44iZ3UZy41U3bS2hmO 7Y2h5/yC5MTmdTry9hQh46SwzYMCAaJ9gUJDTec12a4yW21aFka6dAJ7SK7jYjd0EQOm zRPk/LPuaiGISLetafheZfJku4A3jFsCDub+2Be21BQNrkhY9J/YRRNMmjW1tpkyzyHR TG2O81klCVhEM5h7pXegPa/bvpezx7doxIR/1uq0M4l7bR28e+Wg3deozravN79e18Fq y+oCWpw/AhmyqPOD1TXrrG1lv3nh4IscghbsDlSNmWepcD4LD9xrpyWB1q8Tu767qbYT jQ9g== X-Gm-Message-State: AOAM532jfaLXo8xemMKZkJZnip03a8mtRIsFouHuJNeuP0vpqeUBuHOL GZ9t5HByTbIzEW4DkGJtyotxZkyNKtXhNQ== X-Google-Smtp-Source: ABdhPJzrXa3wwZGxjn8Y3rjCjnatCINRjlh7VLiCJ0v7OXJgi6swj/j2r79q/M9M5+b3VvTruLajVQ== X-Received: by 2002:aed:2791:: with SMTP id a17mr1176456qtd.34.1634661892387; Tue, 19 Oct 2021 09:44:52 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-b5ac-d4ae-96e7-5d3d.res6.spectrum.com. [2603:6081:7b01:cbda:b5ac:d4ae:96e7:5d3d]) by smtp.gmail.com with ESMTPSA id c7sm7684172qtj.33.2021.10.19.09.44.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Oct 2021 09:44:51 -0700 (PDT) Date: Tue, 19 Oct 2021 12:44:49 -0400 From: Tom Rini To: Simon Glass Cc: Wolfgang Denk , U-Boot Mailing List , Rasmus Villemoes , Heinrich Schuchardt , Joe Hershberger Subject: Re: [PATCH v8 4/8] env: Allow U-Boot scripts to be placed in a .env file Message-ID: <20211019164449.GJ7964@bill-the-cat> References: <20211018181322.1181847-1-sjg@chromium.org> <20211018121315.v8.4.Ie78bfbfca0d01d9cba501e127f446ec48e1f7afe@changeid> <20211019140711.GC7964@bill-the-cat> <20211019142529.GE7964@bill-the-cat> <3573814.1634660430@gemini.denx.de> <20211019163000.GI7964@bill-the-cat> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="8gXok1oAG3JjjKJS" Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean --8gXok1oAG3JjjKJS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Oct 19, 2021 at 10:39:55AM -0600, Simon Glass wrote: > Hi Tom, >=20 > On Tue, 19 Oct 2021 at 10:30, Tom Rini wrote: > > > > On Tue, Oct 19, 2021 at 10:24:25AM -0600, Simon Glass wrote: > > > Hi Wolfgang, > > > > > > On Tue, 19 Oct 2021 at 10:20, Wolfgang Denk wrote: > > > > > > > > Dear Simon, > > > > > > > > In message you wrote: > > > > > > > > > > But how do we handle this? > > > > > > > > > > var+=3Dfred > > > > > > > > > > Is this appending to var or assigning to var+ ? > > > > > > > > It is assigning to "var+". > > > > > > er... > > > > > > > > > > > > > var++=3Dfred > > > > > > > > > > is unambiguous but very confusing. I think it would be better to = disallow + > > > > > > > > It's neither unambiguous nor confusing. It is assigning to "var++". > > > > > > What? Can you read that again? > > > > With the assumption that the append operator is "=3D+" and NOT "+=3D" t= hen > > yes, your examples are unambiguous because =3D is not allowed in variab= le > > names, before and after. > > > > > > I think we should not change what is old and might be in use. > > > > > > > > It is much easier to change what is new and can be defined at will. > > > > > > > > If we define for example that "=3D+" appends, then we = can > > > > also define our own escape rules, for example: > > > > > > > > var=3Dfred assigns > > > > var=3D+fred appends "fred" > > > > var=3D\+fred assignes the value "+fred" > > > > var=3D++fred appends "+fred" > > > > > > I don't like that at all. It requires an escape for a common case and > > > is very confusing. > > > > Wait saying we'll add "+SOMETHING" is a common case? >=20 > Yes we have places where we add to env vars depending on CONFIG settings. Yes, but what requires escape is we want "var" to evaluate to or append the string "+fred". Not append "fred" which is common. > > > Since people will be converting their out-of-tree scripts anyway, they > > > can check for this sort of madness at the time. There should be no > > > problem. > > > > I'm not sure I like saying the operator is "=3D+" rather than "+=3D" be= cause > > "=3D+" is a less commonly seen operator and tends to be an alternative > > appends for special cases / side-effects / position in parsing. >=20 > Me neither. I started hearing Voltaire's admonition ringing in my head > a few emails back. >=20 > The way I have this, is it fairly trivial to convert an existing > script to a text file. I suspect it can be done automatically but I > have not actually tried it. I'd really like to keep it simple. I also > want to invoke the 'if you are not in mainline you don't exist' maxim > at this point. I really want to see the non-trivially-constructed case where "+" is at the end of a variable today. If we can support it in the middle, yes, I can see how there might be example of that in use today. --=20 Tom --8gXok1oAG3JjjKJS Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmFu9fsACgkQFHw5/5Y0 tyzP7gv/fswZEDtoFvVnyk6fmpykZL0xwkZiat2JzrHhqZrNXNZwQUS4VuEIDkPU bH1sPAZePeoSDj5JePLAF4qJLoUiy2Xme8xJ8zFy/LeHzVu8L46G2/grX/pGQJ4i Dk3VUL6A3IbaPjETQ4WzQaUiNYQ+rTDp47hIBvygYH0cNvC9SqkC7YHW2a2vBA0T mA/sRatw30FnlYUhb/d5+oypVgcNCcBs05yej39P98dS6ADTcD5SbnCG13ne7UFp YiO7fWCFqn6Yds54xkqgqtk2SZzo7IhViqK6fA6JWnwZEvS5ufWEsNaG+evoNjuA DDrbbmx4S5PJz4mTn9RccCCV5cEQ8WU+wTUB7HNCZ0T5RcptKZyWie3BHDbvale6 08zScWVv+mAIBg3LtKwI82kPpin35nUgIwce562uNuTjffclHpOeYCPf+5am0wpZ r+ufl7ysP/fWoM/S1lwO8tHJKzFWZBJlwhZFSKTzJqkrcqHKzHtzhp+G/kvB0hXf 9+R04dV+ =VhbR -----END PGP SIGNATURE----- --8gXok1oAG3JjjKJS--