Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Ludovic Desroches <ludovic.desroches@atmel.com>
To: buildroot@busybox.net
Subject: [Buildroot] Problem with apply-patches.sh
Date: Mon, 16 Apr 2012 18:58:47 +0200	[thread overview]
Message-ID: <4F8C4FC7.40705@atmel.com> (raw)
In-Reply-To: <CAFbHwiS3H-a_UXb6CKxZ46FdTC7kDgG1NkR+Oqco-rvzCXT3Kw@mail.gmail.com>

Le 04/16/2012 06:54 PM, Will Newton a ?crit :
> On Mon, Apr 16, 2012 at 5:42 PM, Ludovic Desroches
> <ludovic.desroches@atmel.com>  wrote:
>> Le 04/16/2012 06:27 PM, Will Newton a ?crit :
>>
>>> On Mon, Apr 16, 2012 at 5:23 PM, Ludovic Desroches
>>> <ludovic.desroches@atmel.com>    wrote:
>>>>
>>>> Le 04/16/2012 06:09 PM, Will Newton a ?crit :
>>>>
>>>>> On Mon, Apr 16, 2012 at 5:00 PM, Ludovic Desroches
>>>>> <ludovic.desroches@atmel.com>      wrote:
>>>>>>
>>>>>>
>>>>>> Hi
>>>>>>
>>>>>> Le 04/16/2012 04:40 PM, Will Newton a ?crit :
>>>>>>
>>>>>>> Hi all,
>>>>>>>
>>>>>>> I noticed that in some cases apply-patches.sh will misbehave if you
>>>>>>> have a file matching the glob '*.patch' in the top-level directory.
>>>>>>> For example the patching of binutils fails in this case. The problem
>>>>>>> is at the line:
>>>>>>>
>>>>>>>      support/scripts/apply-patches.sh $(@D)
>>>>>>> $($(PKG)_DIR_PREFIX)/$(RAWNAME)/$(NAMEVER) \*.patch \*.patch.$(ARCH)
>>>>>>> || exit 1;
>>>>>>>
>>>>>>> in package/Makefile.package.in. The glob gets expanded prematurely (to
>>>>>>> e.g. myfile.patch) and then the expanded glob is passed to
>>>>>>> apply-patches.sh which will fail to find any patches matching the
>>>>>>> glob. I've had a go at trying to stop this happening but with no
>>>>>>> success so far. Can anyone think of any creative ways to suppress this
>>>>>>> expansion?
>>>>>>>
>>>>>>> Thanks,
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> I see what you mean but I can't reproduce your issue:
>>>>>
>>>>>
>>>>>
>>>>> Hi Ludovic, thanks for the quick response!
>>>>>
>>>>> Did you have a dummy patch file in the top-level? e.g.:
>>>>>
>>>>> # cd buildroot
>>>>> # touch mypatch.patch
>>>>> # make
>>>>>
>>>>
>>>> Yes I did this, I have created an empty patch file.
>>>>
>>>>
>>>>> For me that causes the patch patterns passed to apply-patches.sh to
>>>>> look like: mypatch.patch *.patch.arm. The arch specific glob in this
>>>>> case does not match anything so it remains unexpanded.
>>>>>
>>>>
>>>> I agree but I had no error. I didn't do the whole build so maybe I will
>>>> encounter an issue later due to the "no-patched" binutils.
>>>
>>>
>>> I don't think it will cause an obvious issue for most people - I
>>> happen to have a patched binutils so that if the patch is missing
>>> things go wrong quite obviously. I put an echo in the top of
>>> apply-patches.sh and I was quite clearly seeing the glob had been
>>> expanded by the time it was run (whilst building host-binutils).
>>
>>
>> Still true with the patch I sent?
>>
>> For me the glob was expanded here: scan_patchdir $patchdir $patchpattern
>
> Ah yes, of course it was my echo that was expanding the glob! ;-)
>

Yes, use echo "$myvar" to avoid expansion.

> Yes, I just tried your patch and it fixes the problem for me. Thanks!
>

Ok good news.


Regards

Ludovic

      reply	other threads:[~2012-04-16 16:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-16 14:40 [Buildroot] Problem with apply-patches.sh Will Newton
2012-04-16 16:00 ` Ludovic Desroches
2012-04-16 16:02   ` [Buildroot] [PATCH] apply-patches.sh: patch pattern was expanded prematurely ludovic.desroches at atmel.com
2012-04-16 16:07     ` Ludovic Desroches
2012-04-16 21:19     ` Peter Korsgaard
2012-04-16 16:09   ` [Buildroot] Problem with apply-patches.sh Will Newton
2012-04-16 16:23     ` Ludovic Desroches
2012-04-16 16:27       ` Will Newton
2012-04-16 16:42         ` Ludovic Desroches
2012-04-16 16:54           ` Will Newton
2012-04-16 16:58             ` Ludovic Desroches [this message]

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=4F8C4FC7.40705@atmel.com \
    --to=ludovic.desroches@atmel.com \
    --cc=buildroot@busybox.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox