diff options
Diffstat (limited to 'meta/lib/oe/patch.py')
-rw-r--r-- | meta/lib/oe/patch.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py index d8e4ef5398..2b1eee1003 100644 --- a/meta/lib/oe/patch.py +++ b/meta/lib/oe/patch.py | |||
@@ -851,6 +851,7 @@ def src_patches(d, all=False, expand=True): | |||
851 | 851 | ||
852 | 852 | ||
853 | def should_apply(parm, d): | 853 | def should_apply(parm, d): |
854 | import bb.utils | ||
854 | if "mindate" in parm or "maxdate" in parm: | 855 | if "mindate" in parm or "maxdate" in parm: |
855 | pn = d.getVar('PN') | 856 | pn = d.getVar('PN') |
856 | srcdate = d.getVar('SRCDATE_%s' % pn) | 857 | srcdate = d.getVar('SRCDATE_%s' % pn) |
@@ -887,5 +888,15 @@ def should_apply(parm, d): | |||
887 | if srcrev and parm["notrev"] in srcrev: | 888 | if srcrev and parm["notrev"] in srcrev: |
888 | return False, "doesn't apply to revision" | 889 | return False, "doesn't apply to revision" |
889 | 890 | ||
891 | if "maxver" in parm: | ||
892 | pv = d.getVar('PV') | ||
893 | if bb.utils.vercmp_string_op(pv, parm["maxver"], ">"): | ||
894 | return False, "applies to earlier version" | ||
895 | |||
896 | if "minver" in parm: | ||
897 | pv = d.getVar('PV') | ||
898 | if bb.utils.vercmp_string_op(pv, parm["minver"], "<"): | ||
899 | return False, "applies to later version" | ||
900 | |||
890 | return True, None | 901 | return True, None |
891 | 902 | ||