config: add fallback to patch order
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Mon Aug 31 12:47:58 2009 +0200 (2009-08-31)
changeset 1509f79fcf38ec21
parent 1508 7eeeaf4bc78a
child 1510 0d601781661d
config: add fallback to patch order

Add the possibility to fallback to either bundled or local patches
if local or bundled are missing.
config/global/paths.in
scripts/functions
     1.1 --- a/config/global/paths.in	Mon Aug 31 12:51:53 2009 +0200
     1.2 +++ b/config/global/paths.in	Mon Aug 31 12:47:58 2009 +0200
     1.3 @@ -94,6 +94,24 @@
     1.4        Apply your local patches, then apply the patches
     1.5        bundled with crosstool-NG.
     1.6  
     1.7 +config PATCH_BUNDLED_FALLBACK_LOCAL
     1.8 +    bool
     1.9 +    prompt "Bundled only, local if no bundled"
    1.10 +    select PATCH_USE_LOCAL
    1.11 +    select PATCH_SINGLE
    1.12 +    help
    1.13 +      Apply the patches bundled with crosstool-NG;
    1.14 +      if there's no bundled patches, apply your local patches.
    1.15 +
    1.16 +config PATCH_LOCAL_FALLBACK_BUNDLED
    1.17 +    bool
    1.18 +    prompt "Local only, bundled if no local"
    1.19 +    select PATCH_USE_LOCAL
    1.20 +    select PATCH_SINGLE
    1.21 +    help
    1.22 +      Only apply your local patches;
    1.23 +      if there's no local patches, apply patches bundled with crosstool-NG.
    1.24 +
    1.25  endchoice
    1.26  
    1.27  config PATCH_ORDER
    1.28 @@ -103,6 +121,10 @@
    1.29      default "bundled,local"     if PATCH_BUNDLED_LOCAL
    1.30      default "local,bundled"     if PATCH_LOCAL_BUNDLED
    1.31  
    1.32 +config PATCH_SINGLE
    1.33 +    bool
    1.34 +    default n
    1.35 +
    1.36  config PATCH_USE_LOCAL
    1.37      bool
    1.38      default n
     2.1 --- a/scripts/functions	Mon Aug 31 12:51:53 2009 +0200
     2.2 +++ b/scripts/functions	Mon Aug 31 12:47:58 2009 +0200
     2.3 @@ -630,6 +630,9 @@
     2.4                      CT_DoExecLog ALL patch -g0 -F1 -p1 -f <"${p}"
     2.5                  fi
     2.6              done
     2.7 +            if [ "${CT_PATCH_SINGLE}" = "y" ]; then
     2.8 +                break
     2.9 +            fi
    2.10          fi
    2.11      done
    2.12