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/lib | |
parent | 444e44806530e90300135cc66cf7d160beb1b4be (diff) | |
download | poky-68385456af93a6a80c558676fd176e3ec81c9183.tar.gz |
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/lib')
-rw-r--r-- | meta/lib/oe/distro_check.py | 33 |
1 files changed, 29 insertions, 4 deletions
diff --git a/meta/lib/oe/distro_check.py b/meta/lib/oe/distro_check.py index 58972585a6..3f61630d1a 100644 --- a/meta/lib/oe/distro_check.py +++ b/meta/lib/oe/distro_check.py | |||
@@ -230,7 +230,7 @@ def update_distro_data(distro_check_dir, datetime): | |||
230 | f = open(datetime_file, "r+b") | 230 | f = open(datetime_file, "r+b") |
231 | fcntl.lockf(f, fcntl.LOCK_EX) | 231 | fcntl.lockf(f, fcntl.LOCK_EX) |
232 | saved_datetime = f.read() | 232 | saved_datetime = f.read() |
233 | if saved_datetime != datetime: | 233 | if saved_datetime[0:8] != datetime[0:8]: |
234 | bb.note("The build datetime did not match: saved:%s current:%s" % (saved_datetime, datetime)) | 234 | bb.note("The build datetime did not match: saved:%s current:%s" % (saved_datetime, datetime)) |
235 | bb.note("Regenerating distro package lists") | 235 | bb.note("Regenerating distro package lists") |
236 | create_distro_packages_list(distro_check_dir) | 236 | create_distro_packages_list(distro_check_dir) |
@@ -247,10 +247,33 @@ def compare_in_distro_packages_list(distro_check_dir, d): | |||
247 | if not os.path.isdir(distro_check_dir): | 247 | if not os.path.isdir(distro_check_dir): |
248 | raise Exception("compare_in_distro_packages_list: invalid distro_check_dir passed") | 248 | raise Exception("compare_in_distro_packages_list: invalid distro_check_dir passed") |
249 | 249 | ||
250 | localdata = bb.data.createCopy(d) | ||
250 | pkglst_dir = os.path.join(distro_check_dir, "package_lists") | 251 | pkglst_dir = os.path.join(distro_check_dir, "package_lists") |
251 | matching_distros = [] | 252 | matching_distros = [] |
253 | pn = bb.data.getVar('PN', d, True) | ||
252 | recipe_name = bb.data.getVar('PN', d, True) | 254 | recipe_name = bb.data.getVar('PN', d, True) |
253 | tmp = bb.data.getVar('DISTRO_PN_ALIAS', d, True) | 255 | bb.note("Checking: %s" % pn) |
256 | |||
257 | if pn.find("-native") != -1: | ||
258 | pnstripped = pn.split("-native") | ||
259 | bb.data.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + bb.data.getVar('OVERRIDES', d, True), localdata) | ||
260 | bb.data.update_data(localdata) | ||
261 | recipe_name = pnstripped[0] | ||
262 | |||
263 | if pn.find("-cross") != -1: | ||
264 | pnstripped = pn.split("-cross") | ||
265 | bb.data.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + bb.data.getVar('OVERRIDES', d, True), localdata) | ||
266 | bb.data.update_data(localdata) | ||
267 | recipe_name = pnstripped[0] | ||
268 | |||
269 | if pn.find("-initial") != -1: | ||
270 | pnstripped = pn.split("-initial") | ||
271 | bb.data.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + bb.data.getVar('OVERRIDES', d, True), localdata) | ||
272 | bb.data.update_data(localdata) | ||
273 | recipe_name = pnstripped[0] | ||
274 | |||
275 | bb.note("Recipe: %s" % recipe_name) | ||
276 | tmp = bb.data.getVar('DISTRO_PN_ALIAS', localdata, True) | ||
254 | distro_pn_aliases = {} | 277 | distro_pn_aliases = {} |
255 | if tmp: | 278 | if tmp: |
256 | list = tmp.split(' ') | 279 | list = tmp.split(' ') |
@@ -271,6 +294,8 @@ def compare_in_distro_packages_list(distro_check_dir, d): | |||
271 | f.close() | 294 | f.close() |
272 | break | 295 | break |
273 | f.close() | 296 | f.close() |
297 | |||
298 | bb.note("Matching: %s" % matching_distros) | ||
274 | return matching_distros | 299 | return matching_distros |
275 | 300 | ||
276 | def save_distro_check_result(result, datetime, d): | 301 | def save_distro_check_result(result, datetime, d): |
@@ -281,8 +306,8 @@ def save_distro_check_result(result, datetime, d): | |||
281 | return | 306 | return |
282 | if not os.path.isdir(logdir): | 307 | if not os.path.isdir(logdir): |
283 | os.makedirs(logdir) | 308 | os.makedirs(logdir) |
284 | result_file = os.path.join(logdir, "distro_check-" + datetime + ".results") | 309 | result_file = os.path.join(logdir, "distrocheck.csv") |
285 | line = pn + " : " | 310 | line = pn + ", " |
286 | for i in result: | 311 | for i in result: |
287 | line = line + i + ", " | 312 | line = line + i + ", " |
288 | if result: | 313 | if result: |