diff options
author | Patrick Ohly <patrick.ohly@intel.com> | 2015-06-15 18:05:13 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-06-23 11:38:12 +0100 |
commit | 9f5792088315ab42f77fe1a1af7d2225e7ad5418 (patch) | |
tree | c9cffad43880649e1cc566142826eafc3419a948 | |
parent | 04066239e9cd6a8461fb2c18e826289469ac1240 (diff) | |
download | openembedded-core-9f5792088315ab42f77fe1a1af7d2225e7ad5418.tar.gz openembedded-core-9f5792088315ab42f77fe1a1af7d2225e7ad5418.tar.bz2 openembedded-core-9f5792088315ab42f77fe1a1af7d2225e7ad5418.zip |
insane.bbclass: fix false negative in build-deps QA check
When a recipe called 'foobar-test' links against 'foobar' without
listing that in DEPENDS, the build-deps check misses that error
because it looks for 'foobar' in a package string containing (among
others) the 'foobar-test' name, leading to the incorrect conclusion
that the package is listed as dependency.
The 'packages' string needs to be split into individual package names
before the check. Doing that once directly after reading the value is
more efficient than splitting inside package_qa_check_rdepends() because
the caller also needs the individual components.
Also use a set to speed up the 'package in packages' check.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
-rw-r--r-- | meta/classes/insane.bbclass | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass index dc891d5490..a11085313b 100644 --- a/meta/classes/insane.bbclass +++ b/meta/classes/insane.bbclass @@ -980,12 +980,12 @@ python do_package_qa () { # Scan the packages... pkgdest = d.getVar('PKGDEST', True) - packages = d.getVar('PACKAGES', True) + packages = set((d.getVar('PACKAGES', True) or '').split()) cpath = oe.cachedpath.CachedPath() global pkgfiles pkgfiles = {} - for pkg in (packages or "").split(): + for pkg in packages: pkgfiles[pkg] = [] for walkroot, dirs, files in cpath.walk(pkgdest + "/" + pkg): for file in files: @@ -1009,7 +1009,7 @@ python do_package_qa () { walk_sane = True rdepends_sane = True deps_sane = True - for package in packages.split(): + for package in packages: skip = (d.getVar('INSANE_SKIP_' + package, True) or "").split() if skip: bb.note("Package %s skipping QA tests: %s" % (package, str(skip))) |