From 30f70172bf1bcad4548c4b5b47724b4ef1c3ef3f Mon Sep 17 00:00:00 2001 From: Scott Rifenbark Date: Thu, 3 May 2018 13:03:09 -0700 Subject: ref-manual: Updated do_patch task description I added more content to this task description to help describe how patching is performed and how the task uses the "apply" parameter that can be provided with the SRC_URI variable. (From yocto-docs rev: 6717a3326b0005f6a57be4cc026693b7cd9e8d08) Signed-off-by: Scott Rifenbark Signed-off-by: Richard Purdie --- documentation/ref-manual/ref-tasks.xml | 76 ++++++++++++++++++++++++++++++++-- 1 file changed, 72 insertions(+), 4 deletions(-) (limited to 'documentation/ref-manual') diff --git a/documentation/ref-manual/ref-tasks.xml b/documentation/ref-manual/ref-tasks.xml index b4db97c53b..93ad692775 100644 --- a/documentation/ref-manual/ref-tasks.xml +++ b/documentation/ref-manual/ref-tasks.xml @@ -429,12 +429,80 @@ Locates patch files and applies them to the source code. - See the + + + + After fetching and unpacking source files, the build system locates + and applies patches to the source code. + Patch files, by default, are *.patch and + *.diff files created and kept in a + subdirectory of the directory holding the recipe file. + For example, consider the + bluez5 + recipe from the OE-Core layer (i.e. + poky/meta): + + poky/meta/recipes-connectivity/bluez5 + + This recipe has two patch files located here: + + poky/meta/recipes-connectivity/bluez5/bluez5 + + + + + The recipe for bluez5 uses the + SRC_URI + variable to point to the source and patch files needed to build + the recipe. + + In the case for the bluez5_5.48.bb + recipe, the SRC_URI statements are from an + include file bluez5.inc. + + + + + As mentioned earlier, the build system treats files whose file + types are .patch and + .diff as patch files. + However, you can use the "apply=yes" parameter with the + SRC_URI statement to indicate any file as a + patch file: + + SRC_URI = " \ + git://path_to_repo/some_recipe \ + file://file;apply=yes \ + " + + + + + Conversely, if you have a directory full of patch files and you + want to exclude some so that the do_patch + task does not apply them during the patch phase, you can use + the "apply=no" parameter with the SRC_URI + statement: + + SRC_URI = " \ + git://path_to_repo/some_recipe \ + file://path_to_lots_of_patch_files \ + file://path_to_lots_of_patch_files/patch_file5;apply=no \ + " + + In the previous example, assuming all the files in the directory + holding the patch files end with either .patch + or .diff, every file would be applied as a + patch by default except for the + patch_file5 patch. + + + + You can find out more about the patching process in the "Patching" section in the Yocto Project Overview and Concepts Manual and the - "Patching Code"" - section in the Yocto Project Development Tasks Manual for more - information. + "Patching Code" + section in the Yocto Project Development Tasks Manual. -- cgit v1.2.3-54-g00ecf