All of lore.kernel.org
 help / color / mirror / Atom feed
From: mcgrof@kernel.org (Luis R. Rodriguez)
To: cocci@systeme.lip6.fr
Subject: [Cocci] [PATCH 4/4] scripts/coccinelle: require coccinelle >= 1.0.4 on device_node_continue.cocci
Date: Tue, 14 Jun 2016 15:10:17 -0700	[thread overview]
Message-ID: <1465942217-14452-5-git-send-email-mcgrof@kernel.org> (raw)
In-Reply-To: <1465942217-14452-1-git-send-email-mcgrof@kernel.org>

Make use of the new kernel python requirements library to be able to
specify coccinelle binary version requirements. The cocci file
device_node_continue.cocci requires at least coccinelle 1.0.4.

Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
---
 scripts/coccinelle/iterators/device_node_continue.cocci | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/scripts/coccinelle/iterators/device_node_continue.cocci b/scripts/coccinelle/iterators/device_node_continue.cocci
index 38ab744a4037..b590de9418d1 100644
--- a/scripts/coccinelle/iterators/device_node_continue.cocci
+++ b/scripts/coccinelle/iterators/device_node_continue.cocci
@@ -12,6 +12,19 @@ virtual context
 virtual org
 virtual report
 
+// This uses a conjunction, which requires at least coccinelle >= 1.0.4
+ at script:python@
+@@
+
+import sys
+from lib import reqs
+
+req = reqs.Req()
+req.coccinelle('1.0.4')
+if not req.reqs_match():
+    cocci.exit()
+    sys.exit(1)
+
 @r exists@
 expression e1,e2;
 local idexpression n;
-- 
2.8.2

WARNING: multiple messages have this Message-ID (diff)
From: "Luis R. Rodriguez" <mcgrof@kernel.org>
To: Julia.Lawall@lip6.fr, Gilles.Muller@lip6.fr,
	nicolas.palix@imag.fr, mmarek@suse.com
Cc: linux-kernel@vger.kernel.org, cocci@systeme.lip6.fr,
	"Luis R. Rodriguez" <mcgrof@kernel.org>
Subject: [PATCH 4/4] scripts/coccinelle: require coccinelle >= 1.0.4 on device_node_continue.cocci
Date: Tue, 14 Jun 2016 15:10:17 -0700	[thread overview]
Message-ID: <1465942217-14452-5-git-send-email-mcgrof@kernel.org> (raw)
In-Reply-To: <1465942217-14452-1-git-send-email-mcgrof@kernel.org>

Make use of the new kernel python requirements library to be able to
specify coccinelle binary version requirements. The cocci file
device_node_continue.cocci requires at least coccinelle 1.0.4.

Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
---
 scripts/coccinelle/iterators/device_node_continue.cocci | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/scripts/coccinelle/iterators/device_node_continue.cocci b/scripts/coccinelle/iterators/device_node_continue.cocci
index 38ab744a4037..b590de9418d1 100644
--- a/scripts/coccinelle/iterators/device_node_continue.cocci
+++ b/scripts/coccinelle/iterators/device_node_continue.cocci
@@ -12,6 +12,19 @@ virtual context
 virtual org
 virtual report
 
+// This uses a conjunction, which requires at least coccinelle >= 1.0.4
+@script:python@
+@@
+
+import sys
+from lib import reqs
+
+req = reqs.Req()
+req.coccinelle('1.0.4')
+if not req.reqs_match():
+    cocci.exit()
+    sys.exit(1)
+
 @r exists@
 expression e1,e2;
 local idexpression n;
-- 
2.8.2

  parent reply	other threads:[~2016-06-14 22:10 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-14 22:10 [Cocci] [PATCH 0/4] scripts: add basic python version library and use it Luis R. Rodriguez
2016-06-14 22:10 ` Luis R. Rodriguez
2016-06-14 22:10 ` [Cocci] [PATCH 1/4] coccicheck: propagate error and stop processing after first error Luis R. Rodriguez
2016-06-14 22:10   ` Luis R. Rodriguez
2016-06-14 22:10 ` [Cocci] [PATCH 2/4] scripts: add reqs python library Luis R. Rodriguez
2016-06-14 22:10   ` Luis R. Rodriguez
2016-06-15  6:06   ` [Cocci] " Julia Lawall
2016-06-15  6:06     ` Julia Lawall
2016-06-15 16:04     ` [Cocci] " Luis R. Rodriguez
2016-06-15 16:04       ` Luis R. Rodriguez
2016-06-15  7:50   ` [Cocci] " Michal Marek
2016-06-15  7:50     ` Michal Marek
2016-06-15 16:02     ` [Cocci] " Luis R. Rodriguez
2016-06-15 16:02       ` Luis R. Rodriguez
2016-06-15 19:11       ` [Cocci] " Michal Marek
2016-06-15 19:11         ` Michal Marek
2016-06-15 20:26         ` [Cocci] " Luis R. Rodriguez
2016-06-15 20:26           ` Luis R. Rodriguez
2016-06-15 20:31           ` [Cocci] " Julia Lawall
2016-06-15 20:31             ` Julia Lawall
2016-06-15 12:01   ` [Cocci] " SF Markus Elfring
2016-06-15 12:01     ` Aw: " SF Markus Elfring
2016-06-15 15:51     ` Luis R. Rodriguez
2016-06-15 15:51       ` Luis R. Rodriguez
2016-06-14 22:10 ` [Cocci] [PATCH 3/4] coccicheck: enable use of the kernel's " Luis R. Rodriguez
2016-06-14 22:10   ` Luis R. Rodriguez
2016-06-15  7:51   ` [Cocci] " Michal Marek
2016-06-15  7:51     ` Michal Marek
2016-06-15 15:43     ` [Cocci] " Luis R. Rodriguez
2016-06-15 15:43       ` Luis R. Rodriguez
2016-06-14 22:10 ` Luis R. Rodriguez [this message]
2016-06-14 22:10   ` [PATCH 4/4] scripts/coccinelle: require coccinelle >= 1.0.4 on device_node_continue.cocci Luis R. Rodriguez
2016-06-15  6:08   ` [Cocci] " Julia Lawall
2016-06-15  6:08     ` Julia Lawall
2016-06-15 15:45     ` [Cocci] " Luis R. Rodriguez
2016-06-15 15:45       ` Luis R. Rodriguez
2016-06-15  8:43   ` [Cocci] " Julia Lawall
2016-06-15  8:43     ` Julia Lawall
2016-06-15 15:49     ` [Cocci] " Luis R. Rodriguez
2016-06-15 15:49       ` Luis R. Rodriguez
2016-06-15 15:55       ` [Cocci] " Julia Lawall
2016-06-15 15:55         ` Julia Lawall
2016-06-15 16:06         ` [Cocci] " SF Markus Elfring
2016-06-15 16:06           ` SF Markus Elfring
2016-06-15 16:08         ` [Cocci] [PATCH 4/4] " Luis R. Rodriguez
2016-06-15 16:08           ` Luis R. Rodriguez
2016-06-15 16:11           ` [Cocci] " Julia Lawall
2016-06-15 16:11             ` Julia Lawall
2016-06-15 16:46             ` [Cocci] " Luis R. Rodriguez
2016-06-15 16:46               ` Luis R. Rodriguez
2016-06-15 16:52               ` [Cocci] " Julia Lawall
2016-06-15 16:52                 ` Julia Lawall
2016-06-15 19:08                 ` [Cocci] " Luis R. Rodriguez
2016-06-15 19:08                   ` Luis R. Rodriguez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1465942217-14452-5-git-send-email-mcgrof@kernel.org \
    --to=mcgrof@kernel.org \
    --cc=cocci@systeme.lip6.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.