From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 5438737B4 for ; Mon, 8 Oct 2018 12:58:34 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A7735308AA0F; Mon, 8 Oct 2018 10:58:33 +0000 (UTC) Received: from ktraynor.remote.csb (unknown [10.36.118.13]) by smtp.corp.redhat.com (Postfix) with ESMTP id 73C9360C4D; Mon, 8 Oct 2018 10:58:32 +0000 (UTC) To: Luca Boccassi , stable@dpdk.org Cc: christian.ehrhardt@canonical.com, yskoh@mellanox.com References: <20180917180727.21974-1-bluca@debian.org> <20180925123610.25087-1-bluca@debian.org> From: Kevin Traynor Organization: Red Hat Message-ID: Date: Mon, 8 Oct 2018 11:58:31 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <20180925123610.25087-1-bluca@debian.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Mon, 08 Oct 2018 10:58:33 +0000 (UTC) Subject: Re: [dpdk-stable] [RFC stable-scripts v2] 1-import: don't filter commits for later releases that fix backported patches X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Oct 2018 10:58:34 -0000 On 09/25/2018 01:36 PM, Luca Boccassi wrote: > A patch might fix a commit in a later release and so it is skipped. But > that commit might have been backported in the past, so skipping the > patch is wrong. Just a minor thing, but I was a bit confused by the first sentence above. It was clear when I read the code/comment. How about rewording to something like: A patch might fix a commit that has already been backported to the stable branch but is not yet part of a stable release. Acked-by: Kevin Traynor > Rework the list pruning to take this case into account. > > Signed-off-by: Luca Boccassi > --- > v2: create $stable_release directory in case it's not already there > (first round of backporting) > > 1-import | 40 +++++++++++++++++++++++++++++----------- > 1 file changed, 29 insertions(+), 11 deletions(-) > > diff --git a/1-import b/1-import > index 05dfdf0..497c0ae 100755 > --- a/1-import > +++ b/1-import > @@ -28,18 +28,36 @@ import_one_commit() > if [ "$PRUNE_COMMITS" = "yes" ] > then > get_stable_release > - # need to update it in 2021! > - for _major in {16..20} > + tmp_list=$PWD/$stable_release/tmp_list > + rm -f $tmp_list > + mkdir -p $PWD/$stable_release > + > + pushd $STABLE_DIR &>/dev/null > + log=$($GIT log v${RTE_VER_MAJOR}..v$last_release) > + while read line > do > - for _minor in {02..11..3} > - do > - if verlte $stable_release $_major.$_minor > - then > - sed -i "/($_major.$_minor (partially.*\$/d" $commit_list > - sed -i "/($_major.$_minor)\$/d" $commit_list > - fi > - done > - done > + # Get the id of the commit being fixed, for the first check > + id=$(echo $line | awk '{print $2}') > + fixes=$($GIT log --format='%b' -1 $id | sed -n 's,^ *\([Ff]ixes\|[Rr]everts\): *\([0-9a-f]*\).*,\2,p') > + > + # Was stable CC'ed without a Fixes line? If so select it just in case > + if echo $line | grep -q "(N/A)" > + then > + echo $line >> $tmp_list > + # Is the patch fixing a commit that was part of this stable release? > + # If so select it > + elif verlte `echo $line | sed "s/.*(\([0-9][0-9].[0-9][0-9]\).*)/\1/"` $stable_release > + then > + echo $line >> $tmp_list > + # Was the commit (which might be only in a subsequent release) > + # that the patch "fixes" backported? If so select it > + elif test -n fixes && echo $log | grep -q -e "backported from commit $fixes" -e "upstream commit $fixes" > + then > + echo $line >> $tmp_list > + fi > + done < $commit_list > + popd &>/dev/null > + mv $tmp_list $commit_list > fi > > if [ "$GIT_AM_PAUSE_ON_FAIL" = "yes" ] >