For cases when we need to apply some patch over an existent package, we should use FILESEXTRAPATHS
, which includes new directories into the searching algorithm, making the extra file visible to BitBake, as shown:
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:" SRC_URI += "file://mypatch.patch"
In the preceding example, the current directory / package version (${THISDIR}/${PN}-${PV}:
) is included in the directories list used for file searching. The use of the _prepend
operator is important as it guarantees that our provided file is used, even if a file with the same name is added in the lower priority layers in future.
BitBake assumes that every file with a .patch
extension is a patch and applies it accordingly.