[dpdk-stable] patch 'devtools: fix cleanup of checkpatch temporary file' has been queued to LTS release 18.11.6

Kevin Traynor ktraynor at redhat.com
Tue Dec 3 19:26:51 CET 2019


Hi,

FYI, your patch has been queued to LTS release 18.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/10/19. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/4b01f16ae0c477d647edb180b3aadc79a08a6a57

Thanks.

Kevin.

---
>From 4b01f16ae0c477d647edb180b3aadc79a08a6a57 Mon Sep 17 00:00:00 2001
From: David Marchand <david.marchand at redhat.com>
Date: Tue, 13 Aug 2019 08:38:22 +0200
Subject: [PATCH] devtools: fix cleanup of checkpatch temporary file

[ upstream commit 2c7845a70e708039c3f129de86ffcf1fccfa76d9 ]

The regexp part of the cleanup routine was not updated accordingly when
a common prefix for temp files was introduced.
Set the trap handler only when required.

Fixes: ff37ca5d3773 ("devtools: use a common prefix for temporary files")

Signed-off-by: David Marchand <david.marchand at redhat.com>
---
 devtools/checkpatches.sh | 26 ++++++++++++--------------
 1 file changed, 12 insertions(+), 14 deletions(-)

diff --git a/devtools/checkpatches.sh b/devtools/checkpatches.sh
index 02d1c303e..c471731d4 100755
--- a/devtools/checkpatches.sh
+++ b/devtools/checkpatches.sh
@@ -24,12 +24,4 @@ LINE_SPACING,PARENTHESIS_ALIGNMENT,NETWORKING_BLOCK_COMMENT_STYLE,\
 NEW_TYPEDEFS,COMPARISON_TO_NULL"
 
-clean_tmp_files() {
-	if echo $tmpinput | grep -q '^checkpatches\.' ; then
-		rm -f "$tmpinput"
-	fi
-}
-
-trap "clean_tmp_files" INT
-
 print_usage () {
 	cat <<- END_OF_HELP
@@ -105,11 +97,14 @@ check () { # <patch> <commit> <title>
 	if [ -n "$1" ] ; then
 		tmpinput=$1
-	elif [ -n "$2" ] ; then
-		tmpinput=$(mktemp -t dpdk.checkpatches.XXXXXX)
-		git format-patch --find-renames \
-		--no-stat --stdout -1 $commit > "$tmpinput"
 	else
 		tmpinput=$(mktemp -t dpdk.checkpatches.XXXXXX)
-		cat > "$tmpinput"
+		trap "rm -f '$tmpinput'" INT
+
+		if [ -n "$2" ] ; then
+			git format-patch --find-renames \
+			--no-stat --stdout -1 $commit > "$tmpinput"
+		else
+			cat > "$tmpinput"
+		fi
 	fi
 
@@ -138,5 +133,8 @@ check () { # <patch> <commit> <title>
 	fi
 
-	clean_tmp_files
+	if [ "$tmpinput" != "$1" ]; then
+		rm -f "$tmpinput"
+		trap - INT
+	fi
 	[ $ret -eq 0 ] && return 0
 
-- 
2.21.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-03 17:29:54.230534165 +0000
+++ 0042-devtools-fix-cleanup-of-checkpatch-temporary-file.patch	2019-12-03 17:29:51.766749620 +0000
@@ -1 +1 @@
-From 2c7845a70e708039c3f129de86ffcf1fccfa76d9 Mon Sep 17 00:00:00 2001
+From 4b01f16ae0c477d647edb180b3aadc79a08a6a57 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2c7845a70e708039c3f129de86ffcf1fccfa76d9 ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
@@ -19 +20 @@
-index 8e2beee16..b16bace92 100755
+index 02d1c303e..c471731d4 100755
@@ -22,2 +23,2 @@
-@@ -37,12 +37,4 @@ NEW_TYPEDEFS,COMPARISON_TO_NULL"
- options="$options $DPDK_CHECKPATCH_OPTIONS"
+@@ -24,12 +24,4 @@ LINE_SPACING,PARENTHESIS_ALIGNMENT,NETWORKING_BLOCK_COMMENT_STYLE,\
+ NEW_TYPEDEFS,COMPARISON_TO_NULL"
@@ -35 +36 @@
-@@ -151,11 +143,14 @@ check () { # <patch> <commit> <title>
+@@ -105,11 +97,14 @@ check () { # <patch> <commit> <title>
@@ -55 +56 @@
-@@ -192,5 +187,8 @@ check () { # <patch> <commit> <title>
+@@ -138,5 +133,8 @@ check () { # <patch> <commit> <title>



More information about the stable mailing list