diff options
author | Robert Yang <liezhi.yang@windriver.com> | 2015-10-02 01:28:42 -0700 |
---|---|---|
committer | Robert Yang <liezhi.yang@windriver.com> | 2015-10-08 05:58:40 -0700 |
commit | e24694ec19142b36f5e455f67f9e6ac4cf4bb42a (patch) | |
tree | 595aa032c1879f4e45516533d937c0707614e445 /meta | |
parent | c7a39d8c201baa22f57213e4239d36c564a49a53 (diff) | |
download | openembedded-core-contrib-e24694ec19142b36f5e455f67f9e6ac4cf4bb42a.tar.gz |
insane.bbclass: make package_qa_walk() can print all the messages
* If more than one files have the same QA issue, package_qa_walk() can
only print the last one, others are overrided, for example:
messages["host-user-contaminated"] = "foo1"
messages["host-user-contaminated"] = "foo2"
Only foo2 will be printed, this patch fixes the issue.
* Remove unused parameter "path" from package_qa_walk()
The path is a useless parameter in package_qa_walk() since it has been
redined inside.
[YOCTO #8436]
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/insane.bbclass | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass index 61db3e131a..e3a8cd7515 100644 --- a/meta/classes/insane.bbclass +++ b/meta/classes/insane.bbclass @@ -749,8 +749,15 @@ def package_qa_check_staged(path,d): return sane +# Merge src dict's content into dest +def package_qa_merge_dict(dest, src): + if len(dest) == len(src) and dest != src: + for w in src: + if dest[w] != src[w]: + dest[w] = src[w] + '\n' + dest[w] + # Walk over all files in a directory and call func -def package_qa_walk(path, warnfuncs, errorfuncs, skip, package, d): +def package_qa_walk(warnfuncs, errorfuncs, skip, package, d): import oe.qa #if this will throw an exception, then fix the dict above @@ -766,9 +773,17 @@ def package_qa_walk(path, warnfuncs, errorfuncs, skip, package, d): except: elf = None for func in warnfuncs: + warnings_orig = warnings.copy() func(path, package, d, elf, warnings) + # warnings[foo] = "foo1" might be overrided by + # warnings [foo] = "foo2", check and merge. + package_qa_merge_dict(warnings, warnings_orig) for func in errorfuncs: + errors_orig = errors.copy() func(path, package, d, elf, errors) + # errors[foo] = "foo1" might be overrided by + # errors [foo] = "foo2", check and merge. + package_qa_merge_dict(errors, errors_orig) for w in warnings: package_qa_handle_error(w, warnings[w], d) @@ -1094,8 +1109,7 @@ python do_package_qa () { package_qa_handle_error("pkgname", "%s doesn't match the [a-z0-9.+-]+ regex" % package, d) - path = "%s/%s" % (pkgdest, package) - if not package_qa_walk(path, warnchecks, errorchecks, skip, package, d): + if not package_qa_walk(warnchecks, errorchecks, skip, package, d): walk_sane = False if not package_qa_check_rdepends(package, pkgdest, skip, taskdeps, packages, d): rdepends_sane = False |