From 96f56b2603fabd80b864dba019f6c8a721175dd4 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Mon, 22 Jun 2009 16:00:28 +0100 Subject: patch.bbclass: Allow a patch to be applied or not applied against a specific srcrev Signed-off-by: Richard Purdie --- meta/classes/patch.bbclass | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'meta/classes') diff --git a/meta/classes/patch.bbclass b/meta/classes/patch.bbclass index 8bb2dee79..28fdf0798 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) -- cgit v1.2.3