From 3382da9830e74937a0b62a359c37843a2719d44d Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 9 Jul 2010 12:48:13 -0700 Subject: usermanual: Updates to reflect changes in file:// treatment for patches. Signed-off-by: Khem Raj --- docs/usermanual/chapters/recipes.xml | 35 ++++++++++++++++--------------- docs/usermanual/embworld-oe.dbk | 9 ++++---- docs/usermanual/reference/var_src_uri.xml | 15 +++++++------ 3 files changed, 31 insertions(+), 28 deletions(-) diff --git a/docs/usermanual/chapters/recipes.xml b/docs/usermanual/chapters/recipes.xml index 0bbc05f813..fdee72c75d 100644 --- a/docs/usermanual/chapters/recipes.xml +++ b/docs/usermanual/chapters/recipes.xml @@ -71,7 +71,7 @@ used in recipes:S = "${WORKDIR}/postfix-${PV}" PR = "r4" CFLAGS += "-DNO_ASM" -SRC_URI_append = "file://fixup.patch;patch=1" +SRC_URI_append = "file://fixup.patch" @@ -169,7 +169,7 @@ VAR1 ?= "New value" You can append values to existing variables using the += operator. Note that this operator will add a space between the existing content of the variable and the new - content.SRC_URI += "file://fix-makefile.patch;patch=1" + content.SRC_URI += "file://fix-makefile.patch" @@ -196,15 +196,15 @@ VAR1 ?= "New value" The following example shows the space being explicitly added to the start to ensure the appended value is not merged with the - existing value:SRC_URI_append = " file://fix-makefile.patch;patch=1"The + existing value:SRC_URI_append = " file://fix-makefile.patch"The _append method can also be used with overrides, which results in the actions only being performed for the specified - target or machine: [TODO: Link to section on overrides]SRC_URI_append_sh4 = " file://fix-makefile.patch;patch=1"Note + target or machine: [TODO: Link to section on overrides]SRC_URI_append_sh4 = " file://fix-makefile.patch"Note that the appended information is a variable itself, and therefore it's possible to use += or =+ to assign variables to the - _append information:SRC_URI_append = " file://fix-makefile.patch;patch=1" -SRC_URI_append += "file://fix-install.patch;patch=1" + _append information:SRC_URI_append = " file://fix-makefile.patch" +SRC_URI_append += "file://fix-install.patch" @@ -223,7 +223,7 @@ SRC_URI_append += "file://fix-install.patch;patch=1" _prepend method can also be used with overrides, which result in the actions only being performed for the specified target or machine: [TODO: Link to section on - overrides]CFLAGS_prepend_sh4 = " file://fix-makefile.patch;patch=1"Note + overrides]CFLAGS_prepend_sh4 = " file://fix-makefile.patch"Note that the appended information is a variable itself, and therefore it's possible to use += or =+ to assign variables to the @@ -633,7 +633,7 @@ mv fixed.recipe.bb myrecipe.bb The following example from the havp recipe shows a typical SRC_URI definition:SRC_URI = "http://www.server-side.de/download/havp-${PV}.tar.gz \ - file://sysconfdir-is-etc.patch;patch=1 \ + file://sysconfdir-is-etc.patch \ file://havp.init \ file://doc.configure.txt \ file://volatiles.05_havp" @@ -656,11 +656,12 @@ mv fixed.recipe.bb myrecipe.bb - file://sysconfdir-is-etc.patch;patch=1 + file://sysconfdir-is-etc.patch This is a local file that is used to patch the extracted - source code. The patch=1 is what specifies that this is a patch. The + source code. If a filename ends in .patch or .diff then this is + treated as patch file and applied with striplevel 1. The patch will be applied from the unpacked source directory, ${S}. In this case ${S} will be If we take a look at the recipe for quagga we can see example non patch files for configuration and init scripts:SRC_URI = "http://www.quagga.net/download/quagga-${PV}.tar.gz \ - file://fix-for-lib-inpath.patch;patch=1 \ + file://fix-for-lib-inpath.patch \ file://quagga.init \ file://quagga.default \ file://watchquagga.init \ @@ -3093,8 +3094,8 @@ PR = "r0"Note that all of the functionality of the recipe is provided this recipe it permits the common code to be used for both old and new recipes:PR = "r1" -SRC_URI += "file://iproute2-2.6.15_no_strip.diff;patch=1;pnum=0 \ - file://new-flex-fix.patch;patch=1" +SRC_URI += "file://iproute2-2.6.15_no_strip.diff;striplevel=0 \ + file://new-flex-fix.patch" require iproute2.inc @@ -3106,10 +3107,10 @@ DATE = "060323" this version, thus replacing the configure task that is provided by the common include:PR = "r7" -SRC_URI_append = "file://configure.patch;patch=1 \ - file://Makefile.in.patch;patch=1 \ - file://Makefile.cget.patch;patch=1 \ - file://util.patch;patch=1" +SRC_URI_append = "file://configure.patch \ + file://Makefile.in.patch \ + file://Makefile.cget.patch \ + file://util.patch" require cherokee.inc diff --git a/docs/usermanual/embworld-oe.dbk b/docs/usermanual/embworld-oe.dbk index c75d32fa1c..d94465e638 100644 --- a/docs/usermanual/embworld-oe.dbk +++ b/docs/usermanual/embworld-oe.dbk @@ -503,7 +503,7 @@ KERNEL_OBJECT_SUFFIX = ".o" SRC_URI = "${KERNEL_MIRROR}/v2./linux-${KV}.tar.bz2" # where to get my specific patches -SRC_URI_append = " ${MY_URL}/patches/linux-${KV}-${MYV}.patch.gz;patch=1" +SRC_URI_append = " ${MY_URL}/patches/linux-${KV}-${MYV}.patch.gz;apply=yes" # specify the source directory # (only necessary where it differs from the package name) @@ -573,8 +573,8 @@ PR = "r1" DEPENDS = "flex-native" SRC_URI = "${DEBIAN_MIRROR}/main/a/at/at_${PV}-11.tar.gz \ - file://configure.patch;patch=1 \ - file://nonrootinstall.patch;patch=1" + file://configure.patch \ + file://nonrootinstall.patch" inherit autotools @@ -601,8 +601,7 @@ to be downloaded: the main distribution tarball with the URL where to find it, and two specific patches to build this package with OpenEmbedded. These patches are located together with the package file. -The patch=1 specifies that this file is to be -applied as patch with . +They are applied as patch with 1 striplevel same as . The ${PV} in the tarball URL is expanded from the recipe version number. And the recipe version number is taken from the file name diff --git a/docs/usermanual/reference/var_src_uri.xml b/docs/usermanual/reference/var_src_uri.xml index 2052fa8896..95632569dd 100644 --- a/docs/usermanual/reference/var_src_uri.xml +++ b/docs/usermanual/reference/var_src_uri.xml @@ -252,18 +252,21 @@ SRC_URI[sha256sum] = "36bdb85c97b39ac604bc58cb7857ee08295242c78a12848ef8a31 - patch + apply={yes|no} - Used as "patch=1" to define this file as a - patch file. Patch files will be copied to + If set to 'yes' it is used as "patch=1" to define this file as a + patch file. Patch files will be symlinked into ${S}/patches and then applied to source from - within the source directory, ${S}. + within the source directory, ${S}. + If set to 'no' the file will be copied to ${S} + during unpack. + - pnum + striplevel By default patches are applied with the "-p @@ -272,7 +275,7 @@ SRC_URI[sha256sum] = "36bdb85c97b39ac604bc58cb7857ee08295242c78a12848ef8a31 the value passed to "-p". The most typical use is when the patches are relative to the source directory already and need to be applied using "-p 0", in which case - the "pnum=0" option is supplied. + the "striplevel=0" option is supplied. -- cgit 1.2.3-korg