diff options
author | Marcin Juszkiewicz <hrw@openembedded.org> | 2006-05-20 12:08:21 +0000 |
---|---|---|
committer | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2006-05-20 12:08:21 +0000 |
commit | 775ad19d1e712b2cdff21226820f8535964a9f70 (patch) | |
tree | 572d8407f96294b9e6af5c1724b6fa96dc60f5ac | |
parent | 2a46e18cceae6f0ead7d2d470bc78fb0f6478b0a (diff) | |
parent | 3360528ed1615dff05dddca99d26fc67fa54e77b (diff) |
merge of 01c1850873f10c350058c1f27c3c2f03fc450a29
and aca2e92b4aa01fa7f5bb94eede89c3e395a5c5e9
-rw-r--r-- | classes/base.bbclass | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass index 5f0e0d2fce..683b9e0d2a 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -475,6 +475,34 @@ python base_do_patch() { else: pname = os.path.basename(unpacked) + if "mindate" in parm: + mindate = parm["mindate"] + else: + mindate = 0 + + if "maxdate" in parm: + maxdate = parm["maxdate"] + else: + maxdate = bb.data.getVar('DATE', d, 1) + + pn = bb.data.getVar('PN', d, 1) + srcdate = bb.data.getVar('SRCDATE_%s' % pn, d, 1) + + if not srcdate: + srcdate = bb.data.getVar('SRCDATE', d, 1) + + if srcdate == "now": + srcdate = bb.data.getVar('DATE', d, 1) + + if (maxdate < srcdate) or (mindate > srcdate): + if (maxdate < srcdate): + bb.note("Patch '%s' is outdated" % pname) + + if (mindate > srcdate): + bb.note("Patch '%s' is predated" % pname) + + continue + bb.note("Applying patch '%s'" % pname) bb.data.setVar("do_patchcmd", bb.data.getVar("PATCHCMD", d, 1) % (pnum, pname, unpacked), d) bb.data.setVarFlag("do_patchcmd", "func", 1, d) |