All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Gabriel Kerneis <gabriel@kerneis.info>
Cc: qemu-trivial@nongnu.org, Peter Maydell <peter.maydell@linaro.org>,
	Eric Blake <eblake@redhat.com>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-trivial] [PATCH] Quote extra_cflags in config-host.mak
Date: Wed, 11 Sep 2013 17:06:41 +0200	[thread overview]
Message-ID: <52308701.1020706@redhat.com> (raw)
In-Reply-To: <20130911150137.GC15227@kerneis.info>

Il 11/09/2013 17:01, Gabriel Kerneis ha scritto:
> On Wed, Sep 11, 2013 at 04:53:35PM +0200, Paolo Bonzini wrote:
>> Oh, then it's this line in configure that has to be changed to do proper
>> quoting.
>>
>> printf "# Configured with:" >> $config_host_mak
>> printf " '%s'" "$0" "$@" >> $config_host_mak
> 
> No, this line has absolutely nothing to do with it. It's purely a
> comment that is not executed later.

Actually it is... :)  See here:

   sed -n "/.*Configured with/s/[^:]*: //p" $@ | sh

and relate it to your error message:

   config-host.mak is out-of-date, running configure
   sh: 1: Syntax error: "(" unexpected
   make: *** [config-host.mak] Error 2

Your argument is using '', so it conflicts with configure's own use of
'' to quote the arguments.

> The line that has to be fixed is
> really the line starting with "extra_cflags=" in config-host.mak (well,
> at least in my experience - my patch does not touch the first line, at
> it still solves the issue).

Yeah, what I'm missing now is why your patch works.

> Unfortunately, %q is not portable and we probably need something along
> the lines of your proposal above (note that it doesn't handle "("
> though, which is precisely the one causing an issue in my example).

It doesn't need to handle it, because it is not a special character
within quotes.

Paolo


WARNING: multiple messages have this Message-ID (diff)
From: Paolo Bonzini <pbonzini@redhat.com>
To: Gabriel Kerneis <gabriel@kerneis.info>
Cc: qemu-trivial@nongnu.org, Peter Maydell <peter.maydell@linaro.org>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Quote extra_cflags in config-host.mak
Date: Wed, 11 Sep 2013 17:06:41 +0200	[thread overview]
Message-ID: <52308701.1020706@redhat.com> (raw)
In-Reply-To: <20130911150137.GC15227@kerneis.info>

Il 11/09/2013 17:01, Gabriel Kerneis ha scritto:
> On Wed, Sep 11, 2013 at 04:53:35PM +0200, Paolo Bonzini wrote:
>> Oh, then it's this line in configure that has to be changed to do proper
>> quoting.
>>
>> printf "# Configured with:" >> $config_host_mak
>> printf " '%s'" "$0" "$@" >> $config_host_mak
> 
> No, this line has absolutely nothing to do with it. It's purely a
> comment that is not executed later.

Actually it is... :)  See here:

   sed -n "/.*Configured with/s/[^:]*: //p" $@ | sh

and relate it to your error message:

   config-host.mak is out-of-date, running configure
   sh: 1: Syntax error: "(" unexpected
   make: *** [config-host.mak] Error 2

Your argument is using '', so it conflicts with configure's own use of
'' to quote the arguments.

> The line that has to be fixed is
> really the line starting with "extra_cflags=" in config-host.mak (well,
> at least in my experience - my patch does not touch the first line, at
> it still solves the issue).

Yeah, what I'm missing now is why your patch works.

> Unfortunately, %q is not portable and we probably need something along
> the lines of your proposal above (note that it doesn't handle "("
> though, which is precisely the one causing an issue in my example).

It doesn't need to handle it, because it is not a special character
within quotes.

Paolo

  reply	other threads:[~2013-09-11 15:07 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-11 13:41 [Qemu-trivial] [PATCH] Quote extra_cflags in config-host.mak Gabriel Kerneis
2013-09-11 13:41 ` [Qemu-devel] " Gabriel Kerneis
2013-09-11 14:01 ` [Qemu-trivial] " Paolo Bonzini
2013-09-11 14:01   ` [Qemu-devel] " Paolo Bonzini
2013-09-11 14:42   ` [Qemu-trivial] " Gabriel Kerneis
2013-09-11 14:42     ` [Qemu-devel] " Gabriel Kerneis
2013-09-11 14:53     ` [Qemu-trivial] " Paolo Bonzini
2013-09-11 14:53       ` [Qemu-devel] " Paolo Bonzini
2013-09-11 15:01       ` [Qemu-trivial] " Gabriel Kerneis
2013-09-11 15:01         ` [Qemu-devel] " Gabriel Kerneis
2013-09-11 15:06         ` Paolo Bonzini [this message]
2013-09-11 15:06           ` Paolo Bonzini
2013-09-11 15:16           ` [Qemu-trivial] " Gabriel Kerneis
2013-09-11 15:16             ` Gabriel Kerneis
2013-09-11 15:23             ` [Qemu-trivial] " Gabriel Kerneis
2013-09-11 15:23               ` Gabriel Kerneis
2013-09-11 15:29               ` [Qemu-trivial] " Paolo Bonzini
2013-09-11 15:29                 ` Paolo Bonzini
2013-09-11 15:14         ` [Qemu-trivial] " Gabriel Kerneis
2013-09-11 15:14           ` Gabriel Kerneis
2013-09-11 15:55       ` [Qemu-trivial] " Eric Blake
2013-09-11 15:55         ` [Qemu-devel] " Eric Blake

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=52308701.1020706@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=eblake@redhat.com \
    --cc=gabriel@kerneis.info \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    /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.