diff options
Diffstat (limited to 'meta/lib/oe/distro_check.py')
-rw-r--r-- | meta/lib/oe/distro_check.py | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/meta/lib/oe/distro_check.py b/meta/lib/oe/distro_check.py index 4721355bd8..ad391e3b01 100644 --- a/meta/lib/oe/distro_check.py +++ b/meta/lib/oe/distro_check.py | |||
@@ -276,32 +276,32 @@ def compare_in_distro_packages_list(distro_check_dir, d): | |||
276 | localdata = bb.data.createCopy(d) | 276 | localdata = bb.data.createCopy(d) |
277 | pkglst_dir = os.path.join(distro_check_dir, "package_lists") | 277 | pkglst_dir = os.path.join(distro_check_dir, "package_lists") |
278 | matching_distros = [] | 278 | matching_distros = [] |
279 | pn = bb.data.getVar('PN', d, True) | 279 | pn = d.getVar('PN', True) |
280 | recipe_name = bb.data.getVar('PN', d, True) | 280 | recipe_name = d.getVar('PN', True) |
281 | bb.note("Checking: %s" % pn) | 281 | bb.note("Checking: %s" % pn) |
282 | 282 | ||
283 | trim_dict = dict({"-native":"-native", "-cross":"-cross", "-initial":"-initial"}) | 283 | trim_dict = dict({"-native":"-native", "-cross":"-cross", "-initial":"-initial"}) |
284 | 284 | ||
285 | if pn.find("-native") != -1: | 285 | if pn.find("-native") != -1: |
286 | pnstripped = pn.split("-native") | 286 | pnstripped = pn.split("-native") |
287 | bb.data.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + bb.data.getVar('OVERRIDES', d, True), localdata) | 287 | bb.data.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True), localdata) |
288 | bb.data.update_data(localdata) | 288 | bb.data.update_data(localdata) |
289 | recipe_name = pnstripped[0] | 289 | recipe_name = pnstripped[0] |
290 | 290 | ||
291 | if pn.find("-cross") != -1: | 291 | if pn.find("-cross") != -1: |
292 | pnstripped = pn.split("-cross") | 292 | pnstripped = pn.split("-cross") |
293 | bb.data.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + bb.data.getVar('OVERRIDES', d, True), localdata) | 293 | bb.data.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True), localdata) |
294 | bb.data.update_data(localdata) | 294 | bb.data.update_data(localdata) |
295 | recipe_name = pnstripped[0] | 295 | recipe_name = pnstripped[0] |
296 | 296 | ||
297 | if pn.find("-initial") != -1: | 297 | if pn.find("-initial") != -1: |
298 | pnstripped = pn.split("-initial") | 298 | pnstripped = pn.split("-initial") |
299 | bb.data.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + bb.data.getVar('OVERRIDES', d, True), localdata) | 299 | bb.data.setVar('OVERRIDES', "pn-" + pnstripped[0] + ":" + d.getVar('OVERRIDES', True), localdata) |
300 | bb.data.update_data(localdata) | 300 | bb.data.update_data(localdata) |
301 | recipe_name = pnstripped[0] | 301 | recipe_name = pnstripped[0] |
302 | 302 | ||
303 | bb.note("Recipe: %s" % recipe_name) | 303 | bb.note("Recipe: %s" % recipe_name) |
304 | tmp = bb.data.getVar('DISTRO_PN_ALIAS', localdata, True) | 304 | tmp = localdata.getVar('DISTRO_PN_ALIAS', True) |
305 | 305 | ||
306 | distro_exceptions = dict({"OE-Core":'OE-Core', "OpenedHand":'OpenedHand', "Intel":'Intel', "Upstream":'Upstream', "Windriver":'Windriver', "OSPDT":'OSPDT Approved', "Poky":'poky'}) | 306 | distro_exceptions = dict({"OE-Core":'OE-Core', "OpenedHand":'OpenedHand', "Intel":'Intel', "Upstream":'Upstream', "Windriver":'Windriver', "OSPDT":'OSPDT Approved', "Poky":'poky'}) |
307 | 307 | ||
@@ -343,23 +343,23 @@ def compare_in_distro_packages_list(distro_check_dir, d): | |||
343 | return matching_distros | 343 | return matching_distros |
344 | 344 | ||
345 | def create_log_file(d, logname): | 345 | def create_log_file(d, logname): |
346 | logpath = bb.data.getVar('LOG_DIR', d, True) | 346 | logpath = d.getVar('LOG_DIR', True) |
347 | bb.utils.mkdirhier(logpath) | 347 | bb.utils.mkdirhier(logpath) |
348 | logfn, logsuffix = os.path.splitext(logname) | 348 | logfn, logsuffix = os.path.splitext(logname) |
349 | logfile = os.path.join(logpath, "%s.%s%s" % (logfn, bb.data.getVar('DATETIME', d, True), logsuffix)) | 349 | logfile = os.path.join(logpath, "%s.%s%s" % (logfn, d.getVar('DATETIME', True), logsuffix)) |
350 | if not os.path.exists(logfile): | 350 | if not os.path.exists(logfile): |
351 | slogfile = os.path.join(logpath, logname) | 351 | slogfile = os.path.join(logpath, logname) |
352 | if os.path.exists(slogfile): | 352 | if os.path.exists(slogfile): |
353 | os.remove(slogfile) | 353 | os.remove(slogfile) |
354 | os.system("touch %s" % logfile) | 354 | os.system("touch %s" % logfile) |
355 | os.symlink(logfile, slogfile) | 355 | os.symlink(logfile, slogfile) |
356 | bb.data.setVar('LOG_FILE', logfile, d) | 356 | d.setVar('LOG_FILE', logfile) |
357 | return logfile | 357 | return logfile |
358 | 358 | ||
359 | 359 | ||
360 | def save_distro_check_result(result, datetime, result_file, d): | 360 | def save_distro_check_result(result, datetime, result_file, d): |
361 | pn = bb.data.getVar('PN', d, True) | 361 | pn = d.getVar('PN', True) |
362 | logdir = bb.data.getVar('LOG_DIR', d, True) | 362 | logdir = d.getVar('LOG_DIR', True) |
363 | if not logdir: | 363 | if not logdir: |
364 | bb.error("LOG_DIR variable is not defined, can't write the distro_check results") | 364 | bb.error("LOG_DIR variable is not defined, can't write the distro_check results") |
365 | return | 365 | return |