bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Syntax check rules broken if 'exclude' is not defined


From: Eric Blake
Subject: Re: Syntax check rules broken if 'exclude' is not defined
Date: Thu, 29 Mar 2012 17:16:05 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120316 Thunderbird/11.0

On 03/29/2012 07:17 AM, Daniel P. Berrange wrote:
> I noticed that many (most) of the libvirt syntax-check rules were not
> generating any results, despite me introducing obvious violations.
> 
>>From my debugging the problem appears to be caused by this commit:
> 
>   commit 727075d03c670affa68f71313979781f5ba9bbfc
>   Author: Eric Blake <address@hidden>
>   Date:   Thu Mar 1 14:51:31 2012 -0700
> 
>     maint.mk: add per-line exclusions to prohibitions
> 
> 
> If I revert the following hunk from maint.mk
> 
> 
> @@ -258,6 +268,7 @@ define _sc_search_regexp
>     if test -n "$$files"; then                                          \
>       if test -n "$$prohibit"; then                                     \
>         grep $$with_grep_options $(_ignore_case) -nE "$$prohibit" $$files \
> +         | grep -vE "$${exclude-^$$}"                                  \
>           && { msg="$$halt" $(_sc_say_and_exit) } || :;                 \
>       else                                                              \
>         grep $$with_grep_options $(_ignore_case) -LE "$$require" $$files \
> 
> 
> then the syntax-check rules work again. It seems that this grep is
> broken, if a test leaves  $exclude undefined, causing it to filter
> out all results.

I think I figured out why, but I'm still working out how to fix it.

cfg.mk is included _before_ maint.mk.  Therefore, $_sc_search_regexp) is
expanded in cfg.mk prior to the place where maint.mk provides a default
definition for $(exclude), so we are getting the wrong thing expanded,
which breaks the syntax check rule in cfg.mk.

I'll get something working, hopefully later today.

-- 
Eric Blake   address@hidden    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]