All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] configure: Fix evaluation of config-host.mak in create_config
@ 2010-06-11 20:58 Jan Kiszka
  2010-06-12 11:55 ` Aurelien Jarno
  0 siblings, 1 reply; 7+ messages in thread
From: Jan Kiszka @ 2010-06-11 20:58 UTC (permalink / raw)
  To: Aurelien Jarno; +Cc: Paolo Bonzini, qemu-devel

From: Jan Kiszka <jan.kiszka@siemens.com>

Only match on true dir variable assignments, avoid generating garbage
due to the "# Configured with: ..." line which may contain "*dir=" as
well.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 create_config |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/create_config b/create_config
index 23c0cd5..0098e68 100755
--- a/create_config
+++ b/create_config
@@ -13,7 +13,7 @@ case $line in
     pkgversion=${line#*=}
     echo "#define QEMU_PKGVERSION \"$pkgversion\""
     ;;
- prefix=* | *dir=*) # directory configuration
+ prefix=* | [a-z]*dir=*) # directory configuration
     name=${line%=*}
     value=${line#*=}
     define_name=`echo $name | tr '[:lower:]' '[:upper:]'`

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH] configure: Fix evaluation of config-host.mak in create_config
  2010-06-11 20:58 [Qemu-devel] [PATCH] configure: Fix evaluation of config-host.mak in create_config Jan Kiszka
@ 2010-06-12 11:55 ` Aurelien Jarno
  2010-06-12 12:25   ` Jan Kiszka
  0 siblings, 1 reply; 7+ messages in thread
From: Aurelien Jarno @ 2010-06-12 11:55 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Paolo Bonzini, qemu-devel

On Fri, Jun 11, 2010 at 10:58:29PM +0200, Jan Kiszka wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
> 
> Only match on true dir variable assignments, avoid generating garbage
> due to the "# Configured with: ..." line which may contain "*dir=" as
> well.

Wouldn't it be better to skip all lines starting with '#', as this
problem might happen again after some more changes?

Or maybe we should do both.

> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>  create_config |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/create_config b/create_config
> index 23c0cd5..0098e68 100755
> --- a/create_config
> +++ b/create_config
> @@ -13,7 +13,7 @@ case $line in
>      pkgversion=${line#*=}
>      echo "#define QEMU_PKGVERSION \"$pkgversion\""
>      ;;
> - prefix=* | *dir=*) # directory configuration
> + prefix=* | [a-z]*dir=*) # directory configuration
>      name=${line%=*}
>      value=${line#*=}
>      define_name=`echo $name | tr '[:lower:]' '[:upper:]'`
> 
> 

-- 
Aurelien Jarno                          GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH] configure: Fix evaluation of config-host.mak in create_config
  2010-06-12 11:55 ` Aurelien Jarno
@ 2010-06-12 12:25   ` Jan Kiszka
  2010-06-12 14:37     ` Aurelien Jarno
  0 siblings, 1 reply; 7+ messages in thread
From: Jan Kiszka @ 2010-06-12 12:25 UTC (permalink / raw)
  To: Aurelien Jarno; +Cc: Paolo Bonzini, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1167 bytes --]

Aurelien Jarno wrote:
> On Fri, Jun 11, 2010 at 10:58:29PM +0200, Jan Kiszka wrote:
>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>
>> Only match on true dir variable assignments, avoid generating garbage
>> due to the "# Configured with: ..." line which may contain "*dir=" as
>> well.
> 
> Wouldn't it be better to skip all lines starting with '#', as this
> problem might happen again after some more changes?
> 
> Or maybe we should do both.

This is what the patch (implicitly) does.

Jan

> 
>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>> ---
>>  create_config |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/create_config b/create_config
>> index 23c0cd5..0098e68 100755
>> --- a/create_config
>> +++ b/create_config
>> @@ -13,7 +13,7 @@ case $line in
>>      pkgversion=${line#*=}
>>      echo "#define QEMU_PKGVERSION \"$pkgversion\""
>>      ;;
>> - prefix=* | *dir=*) # directory configuration
>> + prefix=* | [a-z]*dir=*) # directory configuration
>>      name=${line%=*}
>>      value=${line#*=}
>>      define_name=`echo $name | tr '[:lower:]' '[:upper:]'`
>>
>>
> 



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH] configure: Fix evaluation of config-host.mak in create_config
  2010-06-12 12:25   ` Jan Kiszka
@ 2010-06-12 14:37     ` Aurelien Jarno
  2010-06-12 16:44       ` Jan Kiszka
  0 siblings, 1 reply; 7+ messages in thread
From: Aurelien Jarno @ 2010-06-12 14:37 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Paolo Bonzini, qemu-devel

On Sat, Jun 12, 2010 at 02:25:10PM +0200, Jan Kiszka wrote:
> Aurelien Jarno wrote:
> > On Fri, Jun 11, 2010 at 10:58:29PM +0200, Jan Kiszka wrote:
> >> From: Jan Kiszka <jan.kiszka@siemens.com>
> >>
> >> Only match on true dir variable assignments, avoid generating garbage
> >> due to the "# Configured with: ..." line which may contain "*dir=" as
> >> well.
> > 
> > Wouldn't it be better to skip all lines starting with '#', as this
> > problem might happen again after some more changes?
> > 
> > Or maybe we should do both.
> 
> This is what the patch (implicitly) does.

Yes, but only for this line. What I mean is something more generic
like:

"#"*) # comment
    continue
    ;;

-- 
Aurelien Jarno                          GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH] configure: Fix evaluation of config-host.mak in create_config
  2010-06-12 14:37     ` Aurelien Jarno
@ 2010-06-12 16:44       ` Jan Kiszka
  2010-06-12 17:57         ` [Qemu-devel] " Paolo Bonzini
  0 siblings, 1 reply; 7+ messages in thread
From: Jan Kiszka @ 2010-06-12 16:44 UTC (permalink / raw)
  To: Aurelien Jarno; +Cc: Paolo Bonzini, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 853 bytes --]

Aurelien Jarno wrote:
> On Sat, Jun 12, 2010 at 02:25:10PM +0200, Jan Kiszka wrote:
>> Aurelien Jarno wrote:
>>> On Fri, Jun 11, 2010 at 10:58:29PM +0200, Jan Kiszka wrote:
>>>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>>>
>>>> Only match on true dir variable assignments, avoid generating garbage
>>>> due to the "# Configured with: ..." line which may contain "*dir=" as
>>>> well.
>>> Wouldn't it be better to skip all lines starting with '#', as this
>>> problem might happen again after some more changes?
>>>
>>> Or maybe we should do both.
>> This is what the patch (implicitly) does.
> 
> Yes, but only for this line. What I mean is something more generic
> like:
> 
> "#"*) # comment
>     continue
>     ;;
> 

IMO, that would only paper over suboptimally expressed patterns for the
other line evaluations.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Qemu-devel] Re: [PATCH] configure: Fix evaluation of config-host.mak in create_config
  2010-06-12 16:44       ` Jan Kiszka
@ 2010-06-12 17:57         ` Paolo Bonzini
  2010-06-13 10:50           ` Aurelien Jarno
  0 siblings, 1 reply; 7+ messages in thread
From: Paolo Bonzini @ 2010-06-12 17:57 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: qemu-devel, Aurelien Jarno

On 06/12/2010 06:44 PM, Jan Kiszka wrote:
>> Yes, but only for this line. What I mean is something more generic
>> like:
>>
>> "#"*) # comment
>>      continue
>>      ;;
>>
>
> IMO, that would only paper over suboptimally expressed patterns for the
> other line evaluations.

Agreed.  I like Jan's patch more.

Paolo

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] Re: [PATCH] configure: Fix evaluation of config-host.mak in create_config
  2010-06-12 17:57         ` [Qemu-devel] " Paolo Bonzini
@ 2010-06-13 10:50           ` Aurelien Jarno
  0 siblings, 0 replies; 7+ messages in thread
From: Aurelien Jarno @ 2010-06-13 10:50 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Jan Kiszka, qemu-devel

On Sat, Jun 12, 2010 at 07:57:52PM +0200, Paolo Bonzini wrote:
> On 06/12/2010 06:44 PM, Jan Kiszka wrote:
> >>Yes, but only for this line. What I mean is something more generic
> >>like:
> >>
> >>"#"*) # comment
> >>     continue
> >>     ;;
> >>
> >
> >IMO, that would only paper over suboptimally expressed patterns for the
> >other line evaluations.
> 
> Agreed.  I like Jan's patch more.
> 

I have applied it.

-- 
Aurelien Jarno                          GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-06-13 11:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-11 20:58 [Qemu-devel] [PATCH] configure: Fix evaluation of config-host.mak in create_config Jan Kiszka
2010-06-12 11:55 ` Aurelien Jarno
2010-06-12 12:25   ` Jan Kiszka
2010-06-12 14:37     ` Aurelien Jarno
2010-06-12 16:44       ` Jan Kiszka
2010-06-12 17:57         ` [Qemu-devel] " Paolo Bonzini
2010-06-13 10:50           ` Aurelien Jarno

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.