summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2009-06-22 16:00:28 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2009-06-22 16:00:28 +0100
commit96f56b2603fabd80b864dba019f6c8a721175dd4 (patch)
tree7f89ee324ededff468a864e6ee34a5d0477a107b /meta
parentc68dd4f8aca589638e8ed7efe7bf1f4815b1c4f2 (diff)
downloadpoky-96f56b2603fabd80b864dba019f6c8a721175dd4.tar.gz
patch.bbclass: Allow a patch to be applied or not applied against a specific srcrev
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/patch.bbclass12
1 files changed, 12 insertions, 0 deletions
diff --git a/meta/classes/patch.bbclass b/meta/classes/patch.bbclass
index 8bb2dee79a..28fdf07982 100644
--- a/meta/classes/patch.bbclass
+++ b/meta/classes/patch.bbclass
@@ -489,6 +489,18 @@ python patch_do_patch() {
489 bb.note("Patch '%s' applies to earlier revisions" % pname) 489 bb.note("Patch '%s' applies to earlier revisions" % pname)
490 continue 490 continue
491 491
492 if "rev" in parm:
493 srcrev = bb.data.getVar('SRCREV', d, 1)
494 if srcrev and parm["rev"] not in srcrev:
495 bb.note("Patch '%s' doesn't apply to revision" % pname)
496 continue
497
498 if "notrev" in parm:
499 srcrev = bb.data.getVar('SRCREV', d, 1)
500 if srcrev and parm["notrev"] in srcrev:
501 bb.note("Patch '%s' doesn't apply to revision" % pname)
502 continue
503
492 bb.note("Applying patch '%s'" % pname) 504 bb.note("Applying patch '%s'" % pname)
493 try: 505 try:
494 patchset.Import({"file":unpacked, "remote":url, "strippath": pnum}, True) 506 patchset.Import({"file":unpacked, "remote":url, "strippath": pnum}, True)