Skip to content

Commit

Permalink
webos_base.bbclass: Add sort feature in webos-{common-,}compile-optio…
Browse files Browse the repository at this point in the history
…n.json

:Release Notes:

:Detailed Notes:

:Testing Performed:
Only build tested.

:QA Notes:
No change to image.

:Issues Addressed:
[WRP-15384] CCC: webos_base.bbclass: Add sort feature in webos-{common-,}compile-option.json
[WRP-15290] Add sort feature in webos-compile-option.json

Cherry-picked-from-commit: 37e3779
Cherry-picked-from-branch:
  • Loading branch information
mark.yang authored and jaekyu-lee committed Jun 20, 2023
1 parent c372aa9 commit d21439a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions meta-webos/classes/webos_base.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def write_compile_option(d):
compile_datafile = os.path.join(d.getVar("TOPDIR"), "webos-compile-option.json")
lock = bb.utils.lockfile(compile_datafile + '.lock')
with open(compile_datafile, "a") as fp:
json.dump(compile_data, fp)
json.dump(compile_data, fp, sort_keys=True)
fp.write(',\n')
bb.utils.unlockfile(lock)

Expand Down Expand Up @@ -216,7 +216,7 @@ def write_compile_option(d):

result_file = os.path.join(d.getVar("TOPDIR"), "webos-common-compile-option.json")
with open(result_file,'w') as rfp:
json.dump(common_options,rfp)
json.dump(common_options,rfp,sort_keys=True)
fp.close()

# BBINCLUDED is changed after RecipeParsed fired so we need to refer it with event handler.
Expand Down

0 comments on commit d21439a

Please sign in to comment.