manual: update for multiple global patch dirs
Updating the documentation to reflect that multiple directories can
now be specified for BR2_GLOBAL_PATCH_DIR. Along with giving an
example use case of how to use multiple global patch directories.
[Thomas: fix minor typo mentionned by Thomas De Schampheleire.]
Signed-off-by: Ryan Barnett <rjbarnet@rockwellcollins.com>
Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
Reviewed-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
diff --git a/docs/manual/patch-policy.txt b/docs/manual/patch-policy.txt
index d9bc8ca..c67d684 100644
--- a/docs/manual/patch-policy.txt
+++ b/docs/manual/patch-policy.txt
@@ -50,10 +50,11 @@
^^^^^^^^^^^^^^^^^^^^^^
The +BR2_GLOBAL_PATCH_DIR+ configuration file option can be
-used to specify a directory containing global package patches. See
-xref:packages-custom[] for details.
+used to specify a space separated list of one or more directories
+containing global package patches. See xref:packages-custom[] for
+details.
-
+[[patch-apply-order]]
How patches are applied
~~~~~~~~~~~~~~~~~~~~~~~
@@ -64,19 +65,24 @@
. If +<packagename>_PATCH+ is defined, then patches from these
tarballs are applied;
-. If there are some +*.patch+ files in the package directory or in the
- a package subdirectory named +<packageversion>+, then:
+. If there are some +*.patch+ files in the package's Buildroot
+ directory or in a package subdirectory named +<packageversion>+,
+ then:
+
* If a +series+ file exists in the package directory, then patches are
applied according to the +series+ file;
+
* Otherwise, patch files matching +<packagename>-*.patch+
are applied in alphabetical order.
- So, to ensure they are applied in the right order, it is hightly
- recommended to named the patch files like this:
+ So, to ensure they are applied in the right order, it is highly
+ recommended to name the patch files like this:
+<packagename>-<number>-<description>.patch+, where +<number>+
refers to the 'apply order'.
+. If +BR2_GLOBAL_PATCH_DIR+ is defined, the directories will be
+ enumerated in the order they are specified. The patches are applied
+ as described in the previous step.
+
. Run the +<packagename>_POST_PATCH_HOOKS+ commands if defined.
If something goes wrong in the steps _3_ or _4_, then the build fails.