[Buildroot] [PATCH] scripts: apply-patches: don't stop if no patch is found for a package

Andi Shyti andi at etezian.org
Wed Nov 6 23:40:13 UTC 2013

> >this happens when for example you want to get as cross compiler
> >the daily snapshot instead of a specific version.
> >
> >The build stops with an error because of that 'exit 1' since it
> >doesn't find any gcc-20131105 patch directory (i think the
> >snapshot is called so).
>  That's a bug in the gcc package then :-)
>  It should actually be converted to using the default patch strategy
> instead of post-patch hooks. Let me look into it...

Thanks for looking into it, please add me in CC when you come to
a solution.

Anyway one solution could be to check whether the gcc chosen is a
snapshot or not, something similar:

diff --git a/support/scripts/apply-patches.sh
index ff72b45..12f384c 100755
--- a/support/scripts/apply-patches.sh
+++ b/support/scripts/apply-patches.sh
@@ -42,6 +42,11 @@ if [ ! -d "${builddir}" ] ; then
     exit 1
 if [ ! -d "${patchdir}" ] ; then
+    if grep -q BR2_GCC_VERSION_SNAP=y .config; then
+       echo "Warning: no patch can be applied to the daily snapshot."
+        exit
+    fi
     echo "Aborting.  '${patchdir}' is not a directory."
     exit 1

looks like a hack, but it's the fastest thing that comes to my
mind :)


More information about the buildroot mailing list