Skip to contentSkip to conversation

configure: Fix evaluation of config-host.mak in create_config

PATCH In review Jan Kiszka 3 participants 7 messages Jun 11, 2010 – Jun 13, 2010

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 1/1 configure: Fix evaluation of config-host.mak in create_config

From: Jan Kiszka <[email protected]>

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

---
 create_config |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
create_config +1 -1
index 23c0cd5..0098e68 100755
@@ -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:]'`
#1 lore raw
Quoted 5 lines · Jan Kiszka

From: Jan Kiszka <[email protected]>

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.

Quoted 20 lines
---
 create_config |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
create_config +1 -1
index 23c0cd5..0098e68 100755
@@ -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:]'`
Signature · 2 lines
Aurelien Jarno                          GPG: 1024D/F1BCDB73
[email protected]                 http://www.aurel32.net
author
#2 lore raw
Quoted 11 lines · Aurelien Jarno
Quoted 5 lines · Jan Kiszka

From: Jan Kiszka <[email protected]>

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

Quoted 22 lines
Quoted 21 lines
---
 create_config |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
create_config +1 -1
index 23c0cd5..0098e68 100755
@@ -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:]'`
#3 lore raw
Quoted 8 lines · Jan Kiszka
Quoted 7 lines · Aurelien Jarno
Quoted 5 lines · Jan Kiszka

From: Jan Kiszka <[email protected]>

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

Quoted 6 lines
Quoted 4 lines

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
    ;;
Signature · 2 lines
Aurelien Jarno                          GPG: 1024D/F1BCDB73
[email protected]                 http://www.aurel32.net
author
#4 lore raw
Quoted 12 lines · Aurelien Jarno
Quoted 11 lines · Jan Kiszka
Quoted 10 lines · Aurelien Jarno
Quoted 5 lines · Jan Kiszka

From: Jan Kiszka <[email protected]>

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.

Quoted 9 lines
Quoted 1 line

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

#5 lore raw
Quoted 10 lines · Jan Kiszka
Quoted 7 lines

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

#6 lore raw
Quoted 9 lines · Paolo Bonzini
Quoted 8 lines · Jan Kiszka
Quoted 7 lines

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

"#"*) # comment

    continue
    ;;
Quoted 5 lines
Quoted 2 lines

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.

Signature · 2 lines
Aurelien Jarno                          GPG: 1024D/F1BCDB73
[email protected]                 http://www.aurel32.net