From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752182AbcFOGIq (ORCPT ); Wed, 15 Jun 2016 02:08:46 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:24795 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750801AbcFOGIp (ORCPT ); Wed, 15 Jun 2016 02:08:45 -0400 X-IronPort-AV: E=Sophos;i="5.26,474,1459807200"; d="scan'208";a="181298011" Date: Wed, 15 Jun 2016 08:08:41 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@localhost6.localdomain6 To: "Luis R. Rodriguez" cc: Gilles Muller , nicolas.palix@imag.fr, mmarek@suse.com, linux-kernel@vger.kernel.org, cocci@systeme.lip6.fr Subject: Re: [PATCH 4/4] scripts/coccinelle: require coccinelle >= 1.0.4 on device_node_continue.cocci In-Reply-To: <1465942217-14452-5-git-send-email-mcgrof@kernel.org> Message-ID: References: <1465942217-14452-1-git-send-email-mcgrof@kernel.org> <1465942217-14452-5-git-send-email-mcgrof@kernel.org> User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 14 Jun 2016, Luis R. Rodriguez wrote: > 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 > --- > 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) This doesn't look very appealing to me. Shouldn't Coccinelle handle this itself? julia > + > @r exists@ > expression e1,e2; > local idexpression n; > -- > 2.8.2 > >