diff options
| -rw-r--r-- | meta/lib/oe/distro_check.py | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/meta/lib/oe/distro_check.py b/meta/lib/oe/distro_check.py index d6abd9bfaa..c85d4fb28b 100644 --- a/meta/lib/oe/distro_check.py +++ b/meta/lib/oe/distro_check.py | |||
| @@ -302,7 +302,7 @@ def compare_in_distro_packages_list(distro_check_dir, d): | |||
| 302 | bb.note("Recipe: %s" % recipe_name) | 302 | bb.note("Recipe: %s" % recipe_name) |
| 303 | tmp = bb.data.getVar('DISTRO_PN_ALIAS', localdata, True) | 303 | tmp = bb.data.getVar('DISTRO_PN_ALIAS', localdata, True) |
| 304 | 304 | ||
| 305 | distro_exceptions = dict({"OE-Core":'OE-Core', "OpenedHand":'OpenedHand', "Intel":'Intel', "Upstream":'Upstream', "WindRiver":'Windriver', "OSPDT":'OSPDT Approved'}) | 305 | distro_exceptions = dict({"OE-Core":'OE-Core', "OpenedHand":'OpenedHand', "Intel":'Intel', "Upstream":'Upstream', "WindRiver":'Windriver', "OSPDT":'OSPDT Approved', "Poky":'poky'}) |
| 306 | 306 | ||
| 307 | if tmp: | 307 | if tmp: |
| 308 | list = tmp.split(' ') | 308 | list = tmp.split(' ') |
| @@ -335,8 +335,9 @@ def compare_in_distro_packages_list(distro_check_dir, d): | |||
| 335 | 335 | ||
| 336 | 336 | ||
| 337 | if tmp != None: | 337 | if tmp != None: |
| 338 | matching_distros.append(tmp) | 338 | list = tmp.split(' ') |
| 339 | 339 | for item in list: | |
| 340 | matching_distros.append(item) | ||
| 340 | bb.note("Matching: %s" % matching_distros) | 341 | bb.note("Matching: %s" % matching_distros) |
| 341 | return matching_distros | 342 | return matching_distros |
| 342 | 343 | ||
| @@ -348,13 +349,17 @@ def save_distro_check_result(result, datetime, d): | |||
| 348 | return | 349 | return |
| 349 | if not os.path.isdir(logdir): | 350 | if not os.path.isdir(logdir): |
| 350 | os.makedirs(logdir) | 351 | os.makedirs(logdir) |
| 351 | result_file = os.path.join(logdir, "distrocheck.csv") | 352 | result_file = os.path.join(logdir, "distrocheck.%s.csv" % datetime) |
| 352 | line = pn | 353 | line = pn |
| 353 | for i in result: | 354 | for i in result: |
| 354 | line = line + "," + i | 355 | line = line + "," + i |
| 355 | if not os.path.exists(result_file): | 356 | if not os.path.exists(result_file): |
| 356 | open(result_file, 'w+b').close() # touch the file so that the next open won't fail | 357 | sresult_file = os.path.join(logdir, "distrocheck.csv") |
| 357 | f = open(result_file, "a+b") | 358 | if os.path.exists(sresult_file): |
| 359 | os.remove(sresult_file) | ||
| 360 | os.system("touch %s" % result_file) | ||
| 361 | os.symlink(result_file, sresult_file) | ||
| 362 | f = open(result_file, "a") | ||
| 358 | import fcntl | 363 | import fcntl |
| 359 | fcntl.lockf(f, fcntl.LOCK_EX) | 364 | fcntl.lockf(f, fcntl.LOCK_EX) |
| 360 | f.seek(0, os.SEEK_END) # seek to the end of file | 365 | f.seek(0, os.SEEK_END) # seek to the end of file |
