diff options
author | Saul Wold <Saul.Wold@intel.com> | 2010-08-26 19:46:40 -0700 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-09-02 09:38:35 +0100 |
commit | 68385456af93a6a80c558676fd176e3ec81c9183 (patch) | |
tree | dca279051ea1de9bb274f7af03f8f112d9c1cf20 /meta/classes/utility-tasks.bbclass | |
parent | 444e44806530e90300135cc66cf7d160beb1b4be (diff) | |
download | openembedded-core-68385456af93a6a80c558676fd176e3ec81c9183.tar.gz openembedded-core-68385456af93a6a80c558676fd176e3ec81c9183.tar.bz2 openembedded-core-68385456af93a6a80c558676fd176e3ec81c9183.tar.xz openembedded-core-68385456af93a6a80c558676fd176e3ec81c9183.zip |
distro_check: fix for natives, cross, and initial recipe types
datetime checking is changed to be once per day
Signed-off-by: Saul Wold <Saul.Wold@intel.com>
distro_check: fix for natives, cross, and initial recipe types
Signed-off-by: Saul Wold <Saul.Wold@intel.com>
Diffstat (limited to 'meta/classes/utility-tasks.bbclass')
-rw-r--r-- | meta/classes/utility-tasks.bbclass | 37 |
1 files changed, 33 insertions, 4 deletions
diff --git a/meta/classes/utility-tasks.bbclass b/meta/classes/utility-tasks.bbclass index b3609965e..8e905308b 100644 --- a/meta/classes/utility-tasks.bbclass +++ b/meta/classes/utility-tasks.bbclass @@ -488,6 +488,31 @@ do_buildall() { : } +addhandler check_eventhandler +python check_eventhandler() { + from bb.event import Handled, NotHandled + # if bb.event.getName(e) == "TaskStarted": + + if bb.event.getName(e) == "BuildStarted": + import oe.distro_check as dc + tmpdir = bb.data.getVar('TMPDIR', e.data, 1) + distro_check_dir = os.path.join(tmpdir, "distro_check") + datetime = bb.data.getVar('DATETIME', e.data, 1) + """initialize log files.""" + logpath = bb.data.getVar('LOG_DIR', e.data, 1) + bb.utils.mkdirhier(logpath) + logfile = os.path.join(logpath, "distrocheck.%s.csv" % bb.data.getVar('DATETIME', e.data, 1)) + if not os.path.exists(logfile): + slogfile = os.path.join(logpath, "distrocheck.csv") + if os.path.exists(slogfile): + os.remove(slogfile) + os.system("touch %s" % logfile) + os.symlink(logfile, slogfile) + bb.data.setVar('LOG_FILE', logfile, e.data) + + return NotHandled +} + addtask distro_check do_distro_check[nostamp] = "1" python do_distro_check() { @@ -495,12 +520,9 @@ python do_distro_check() { import oe.distro_check as dc localdata = bb.data.createCopy(d) bb.data.update_data(localdata) - - tmpdir = bb.data.getVar('TMPDIR', localdata, 1) + tmpdir = bb.data.getVar('TMPDIR', d, 1) distro_check_dir = os.path.join(tmpdir, "distro_check") datetime = bb.data.getVar('DATETIME', localdata, 1) - - # if distro packages list data is old then rebuild it dc.update_distro_data(distro_check_dir, datetime) # do the comparison @@ -510,3 +532,10 @@ python do_distro_check() { dc.save_distro_check_result(result, datetime, d) } +addtask distro_checkall after do_distro_check +do_distro_checkall[recrdeptask] = "do_distro_check" +do_distro_checkall[nostamp] = "1" +do_distro_checkall() { + : +} + |