1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-30 00:20:08 +00:00

patch.bbclass: Allow a patch to be applied or not applied against a specific srcrev

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
This commit is contained in:
Richard Purdie
2009-06-22 16:00:28 +01:00
parent c68dd4f8ac
commit 96f56b2603
+12
View File
@@ -489,6 +489,18 @@ python patch_do_patch() {
bb.note("Patch '%s' applies to earlier revisions" % pname)
continue
if "rev" in parm:
srcrev = bb.data.getVar('SRCREV', d, 1)
if srcrev and parm["rev"] not in srcrev:
bb.note("Patch '%s' doesn't apply to revision" % pname)
continue
if "notrev" in parm:
srcrev = bb.data.getVar('SRCREV', d, 1)
if srcrev and parm["notrev"] in srcrev:
bb.note("Patch '%s' doesn't apply to revision" % pname)
continue
bb.note("Applying patch '%s'" % pname)
try:
patchset.Import({"file":unpacked, "remote":url, "strippath": pnum}, True)