From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt0-x22e.google.com (mail-qt0-x22e.google.com [IPv6:2607:f8b0:400d:c0d::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 5B4651A1E4F for ; Wed, 19 Oct 2016 05:21:16 -0700 (PDT) Received: by mail-qt0-x22e.google.com with SMTP id s49so16442351qta.0 for ; Wed, 19 Oct 2016 05:21:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=qGzYG5xwgSw3Bd0EvEL/os+O0j6YPz0AYwJXa4c1brs=; b=O/sGdbwanNqUK3JtTrvq001wOwefKNIH8kQ0zfoWUvT4QnKUtNtxQvXM3qES7n6iVt hAohxkF2hsL6fFULAQXHhBW1L4PTX1zlcIRikM6i9pBCJyo7rTvCPJObY6BNGuqUuPhq CEjb8aYEs3YkVofbeTNrZn7MplGG/CBLL4jZw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=qGzYG5xwgSw3Bd0EvEL/os+O0j6YPz0AYwJXa4c1brs=; b=cAOepzwpV9Cq29Q3TeuQNrJfiOxZiqUh1L5Kq+l9VfY6KTUiUxbTIrDmajjtT3T/CE 9m2CBnxoO1ogwV7uFwwUyGkrXFofj3GsZuMP6bB1TNI9BOKEpO4GeKYjzl4SH0utr4UM Iu1icOSbyG3y1N23a/hFFKc51zaFz2hgUQB22v6ZlVa2G3uWXPlzwFAZXYooVI0XK4lK uYH4aQEz7gLr+FIOe2Yloaua0vFRHST2T4bNEkPK5IsONrgFnScxXu7Ns4aLQHfjuJql uyXomMyBRKN5lHiyqiNtYli7KtXirdupMPjRrzqwFzW54+ufDp1Qkx6uUHcNTQ0mQsEu tVRA== X-Gm-Message-State: AA6/9RmvEBJRFEZ50MMh0tU6RSbtQxMsAWWB4T79XWJjKY7acLqJ5Y/IgRWSmYJNic4yvueL X-Received: by 10.28.128.145 with SMTP id b139mr2736437wmd.76.1476879674775; Wed, 19 Oct 2016 05:21:14 -0700 (PDT) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id pe5sm68782851wjb.15.2016.10.19.05.21.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Oct 2016 05:21:14 -0700 (PDT) Date: Wed, 19 Oct 2016 13:21:12 +0100 From: Leif Lindholm To: Ard Biesheuvel Cc: Michael Zimmermann , edk2-devel-01 , Liming Gao , "Kinney, Michael D" , Andrew Fish Message-ID: <20161019122112.GG3471@bivouac.eciton.net> References: <20160904154135.4324-1-leif.lindholm@linaro.org> MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [RFC] edksetup.sh: detect updated BaseTools templates X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2016 12:21:16 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline So, this thread kind of petered out... I had an internal report of a user failing to build ArmVirtQemu, and narrowed it down to a case of outdated cached configurations. As a temporary workaround, I've now put the proposed timestamp check into my uefi-tools helper scripts, but that's hiding the problem instead of solving it. On Sun, Sep 04, 2016 at 09:35:19PM +0100, Ard Biesheuvel wrote: > On 4 September 2016 at 17:10, Michael Zimmermann > wrote: > >> Could we instead make the files under Conf/ symlinks to the templates? > > Sounds like a good idea in general but what about windows? afaik only NTFS > > has support for them. > > > > Ah yes, excellent point. > > So perhaps the BaseTools should simply default to the template if the > Conf/ version is missing? I am concerned about breaking people's > workflow where they keep non-trivial local changes in these files. This would absolutely be my preferred solution. Andrew, Mike? / Leif > > On Sun, Sep 4, 2016 at 5:55 PM, Ard Biesheuvel > > wrote: > >> > >> On 4 September 2016 at 16:41, Leif Lindholm > >> wrote: > >> > Make edksetup.sh automatically update the cached configuration under > >> > Conf/ when the templates under BaseTools/Conf/ change. > >> > > >> > Contributed-under: TianoCore Contribution Agreement 1.0 > >> > Signed-off-by: Leif Lindholm > >> > --- > >> > > >> > We keep getting questions from people starting out with EDK2 > >> > development, > >> > whenever certain options in the BaseTools template configs change and > >> > their builds break. I don't know if this naive sledgehammer approach is > >> > acceptable, but I'd like to make life easier for people. > >> > > >> > >> Could we instead make the files under Conf/ symlinks to the templates? > >> That way, people can still keep local changes in these files, which is > >> presumably the reason for this arrangement, while the 'naive' user > >> [with no interest in keeping local changes] does not have to deal with > >> this. > >> > >> > >> > edksetup.sh | 33 +++++++++++++++++++++++++++++++-- > >> > 1 file changed, 31 insertions(+), 2 deletions(-) > >> > > >> > diff --git a/edksetup.sh b/edksetup.sh > >> > index 57368b5..77f0d43 100755 > >> > --- a/edksetup.sh > >> > +++ b/edksetup.sh > >> > @@ -33,12 +33,41 @@ function HelpMsg() > >> > return 1 > >> > } > >> > > >> > +function ClearCache() > >> > +{ > >> > + CONF_FILES="build_rule target tools_def" > >> > + if [ -z "$EDK_TOOLS_PATH" ] > >> > + then > >> > + TEMPLATE_PATH=./BaseTools/Conf/ > >> > + else > >> > + TEMPLATE_PATH="$EDK_TOOLS_PATH/Conf/" > >> > + fi > >> > + > >> > + DELETED_FILES=0 > >> > + for File in $CONF_FILES > >> > + do > >> > + TEMPLATE_FILE="$TEMPLATE_PATH/$File.template" > >> > + CACHE_FILE="Conf/$File.txt" > >> > + if [ "$TEMPLATE_FILE" -nt "$CACHE_FILE" ] > >> > + then > >> > + echo "Removing outdated '$CACHE_FILE'." > >> > + rm "$CACHE_FILE" > >> > + DELETED_FILES=$(($DELETED_FILES + 1)) > >> > + fi > >> > + done > >> > + > >> > + unset TEMPLATE_PATH TEMPLATE_FILE CACHE_FILE > >> > + return $DELETED_FILES > >> > +} > >> > + > >> > function SetWorkspace() > >> > { > >> > # > >> > - # If WORKSPACE is already set, then we can return right now > >> > + # Check for updated BaseTools templates. If none, and > >> > + # WORKSPACE is already set, then we can return right now > >> > # > >> > - if [ -n "$WORKSPACE" ] > >> > + ClearCache > >> > + if [ $? -ne 0 -a -n "$WORKSPACE" ] > >> > then > >> > return 0 > >> > fi > >> > -- > >> > 2.9.3 > >> > > >> _______________________________________________ > >> edk2-devel mailing list > >> edk2-devel@lists.01.org > >> https://lists.01.org/mailman/listinfo/edk2-devel > > > >