diff options
| -rw-r--r-- | meta/classes/patch.bbclass | 12 |
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) |
