summaryrefslogtreecommitdiff
path: root/meta/classes/patch.bbclass
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/classes/patch.bbclass
parentc68dd4f8aca589638e8ed7efe7bf1f4815b1c4f2 (diff)
downloadopenembedded-core-96f56b2603fabd80b864dba019f6c8a721175dd4.tar.gz
openembedded-core-96f56b2603fabd80b864dba019f6c8a721175dd4.tar.bz2
openembedded-core-96f56b2603fabd80b864dba019f6c8a721175dd4.zip
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/classes/patch.bbclass')
-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() {
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)