[Buildroot] Problem with apply-patches.sh

Ludovic Desroches ludovic.desroches at atmel.com
Mon Apr 16 16:23:42 UTC 2012


Le 04/16/2012 06:09 PM, Will Newton a écrit :
> On Mon, Apr 16, 2012 at 5:00 PM, Ludovic Desroches
> <ludovic.desroches at 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.


Regards

Ludovic



More information about the buildroot mailing list