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 23801C433F5 for ; Wed, 3 Nov 2021 07:41:54 +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 26D01610FC for ; Wed, 3 Nov 2021 07:41:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 26D01610FC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.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 6A6E48347E; Wed, 3 Nov 2021 08:41:50 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="IBjTDQDy"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6351D83538; Wed, 3 Nov 2021 08:41:48 +0100 (CET) Received: from mail-il1-x132.google.com (mail-il1-x132.google.com [IPv6:2607:f8b0:4864:20::132]) (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 185DC83257 for ; Wed, 3 Nov 2021 08:41:45 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=email2tema@gmail.com Received: by mail-il1-x132.google.com with SMTP id k1so1632457ilo.7 for ; Wed, 03 Nov 2021 00:41:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=SEKefpCihTmG8BzY1mCdS5xpg/kClNms6rjOSyCKgAY=; b=IBjTDQDyvU8wOgsQeAnbYPbdbJF05IjL1TTBSgCzoHniBAEXmjLVnHNc9cmQYjWspT gTf4YUxmshKYBn6zxMZ9wlbuhYBwMSgKmS93NmvMfPjFIdoIlGmTpZXeDOq2TgMuGc+n 87PPf1p0WLQyDkQiJreJ2HXWjmNYZT0xOtjmvoPHRsl/6IG8RdFnGJ8EYvEOs7DwUST4 DnAPG/1OQEAoXcU6tAo1RMZlhcYQYDyoXNauJ0xPwxBH7OpuVlIeOIZVi4zIRdzkT1Bw gAAXprwYXvZiimzVHEyebRuDMReSyuwNNcEyQV+ZsgZoNiVuPHZC+ZxBHlDqIsohSpDj ab+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=SEKefpCihTmG8BzY1mCdS5xpg/kClNms6rjOSyCKgAY=; b=BFB+b9s7r/RUCfasDM3qwG4ynVevNT8mgA4kDcquhKTjBY1CSEQTKhxgXR3iwnjjWX hvYkgG49CmWXmQmMuhHTzBsSOyxd5dQE6xOnf6Xv0UQcj5uB4nbCgMCpjptasujQW0j7 ODLsUNDyHmEu78xsD/BgM+NSXB6VYubIenZ2M69IcU2EwNrvzNpy7fmRkqctamIwXPPM cXNrmcoRUdCP41M6dLVytWsoFVtWrplIggXXH1maI3T2T5KVf4YNILbTcozrNkuV96oq K0G+Kc47FFOggapQLRCId8T7aGCCe5XlvOEFV6Pilygo9qcOF1dXxARyvU7qbt4jR85h drPw== X-Gm-Message-State: AOAM5322aFy9NZu/Cg14yU1eC9G5eRjthDd+gDnPL6td2QdRT0K8KL4t xXLGcdg3b1nGEAQbUEoUzrUPb1QoDjsUx4M+Z8w= X-Google-Smtp-Source: ABdhPJwxEy62WNxvMhZAXMswYA2b7gAuQuSnM7agDpsIIVYM6MTws5oaQc+OrxwbEeENts+1xTBmVeNkjIylSCwXM2U= X-Received: by 2002:a05:6e02:1608:: with SMTP id t8mr6463059ilu.25.1635925303928; Wed, 03 Nov 2021 00:41:43 -0700 (PDT) MIME-Version: 1.0 References: <20211102071914.696963-1-art@khadas.com> <20211102164454.GQ24579@bill-the-cat> In-Reply-To: <20211102164454.GQ24579@bill-the-cat> From: Art Nikpal Date: Wed, 3 Nov 2021 15:41:32 +0800 Message-ID: Subject: Re: [PATCH v1] env: setenv add resolve value option To: Tom Rini Cc: Simon Glass , marek.behun@nic.cz, Neil Armstrong , Tom Warren , Andre Przywara , U-Boot Mailing List , u-boot-amlogic@groups.io, Artem Lapkin , Nick Xie , Gouwa Wang Content-Type: text/plain; charset="UTF-8" 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 > The high level problem I have with this patch is that we keep going back > to "we really need to update to a modern hush (or other shell) rather > than patching new features in to our ancient fork". Yes it will be fine ! Does anybody have information about these plans ? but in any case my patch didn't broke compatibility like next patch > See also this old patch: > https://patchwork.ozlabs.org/project/uboot/patch/1449255744-25787-1-git-send-email-nm@ti.com/ > Can you please add to the env tests? > please add function comment > ... tnx for suggestions ... i can make v2 variant for my patch , if no one is against this idea On Wed, Nov 3, 2021 at 12:44 AM Tom Rini wrote: > > On Tue, Nov 02, 2021 at 03:19:14PM +0800, Artem Lapkin wrote: > > > Add possibility setup env variable with additional resolving vars inside > > value. > > > > Usage examples > > > > => setenv a hello > > => setenv b world > > => setenv c '${a} ${b}' > > => setenv -r d '${c}! ${a}...' > > => printenv d > > d=hello world! hello... > > > > /* internal usage example */ > > env_resolve("d", "${c}! ${a}..."); > > /* d="hello world! hello..." */ > > > > Notes > > > > Resolving works only for ${var} "bracket" and didn't workd for > > "unbracket" $var > > > > => setenv -r d '$c! $a...' > > => printenv d > > d=$c! $a... > > > > Signed-off-by: Artem Lapkin > > The high level problem I have with this patch is that we keep going back > to "we really need to update to a modern hush (or other shell) rather > than patching new features in to our ancient fork". > > -- > Tom