summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlejandro Hernandez <alejandro.hernandez@linux.intel.com>2015-04-09 16:55:58 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-04-13 22:28:32 +0100
commit9946909dc95c3274a98112cf786d171547b3ed75 (patch)
treec8b1fb4601d44728d783ebeb63ba581897209511
parentac09a1830fffb6aded499ade55c039e35202867e (diff)
downloadopenembedded-core-9946909dc95c3274a98112cf786d171547b3ed75.tar.gz
openembedded-core-9946909dc95c3274a98112cf786d171547b3ed75.tar.bz2
openembedded-core-9946909dc95c3274a98112cf786d171547b3ed75.zip
insane.bbclass: Enhance file-rdeps QA check
Adds symlink-to-sysroot check to QA_WARN to detect symlinks that point to locations under TMPDIR, which are most likely broken. Changes filerdepends from set() to dict(), hence methods for adding or deleting items had to change too. Now it keeps track of key:value relationship, flags the QA issue; warning the user about which file/package causes the problem, making it easier to debug. [YOCTO #7126] Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/insane.bbclass26
1 files changed, 11 insertions, 15 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index ab7ca3b64b..3592575d73 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -30,7 +30,7 @@ WARN_QA ?= "ldflags useless-rpaths rpaths staticdev libdir xorg-driver-abi \
textrel already-stripped incompatible-license files-invalid \
installed-vs-shipped compile-host-path install-host-path \
pn-overrides infodir build-deps file-rdeps \
- unknown-configure-option \
+ unknown-configure-option symlink-to-sysroot \
"
ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch pkgconfig la \
perms dep-cmp pkgvarcheck perm-config perm-line perm-link \
@@ -612,7 +612,6 @@ def package_qa_check_symlink_to_sysroot(path, name, d, elf, messages):
if target.startswith(tmpdir):
trimmed = path.replace(os.path.join (d.getVar("PKGDEST", True), name), "")
messages["symlink-to-sysroot"] = "Symlink %s in %s points to TMPDIR" % (trimmed, name)
-
def package_qa_check_license(workdir, d):
"""
Check for changes in the license files
@@ -811,13 +810,14 @@ def package_qa_check_rdepends(pkg, pkgdest, skip, taskdeps, packages, d):
if bb.data.inherits_class('nativesdk', d):
ignored_file_rdeps |= set(['/bin/bash', '/usr/bin/perl'])
# For Saving the FILERDEPENDS
- filerdepends = set()
+ filerdepends = {}
rdep_data = oe.packagedata.read_subpkgdata(pkg, d)
for key in rdep_data:
if key.startswith("FILERDEPENDS_"):
for subkey in rdep_data[key].split():
- filerdepends.add(subkey)
- filerdepends -= ignored_file_rdeps
+ if subkey not in ignored_file_rdeps:
+ # We already know it starts with FILERDEPENDS_
+ filerdepends[subkey] = key[13:]
if filerdepends:
next = rdepends
@@ -849,31 +849,27 @@ def package_qa_check_rdepends(pkg, pkgdest, skip, taskdeps, packages, d):
# case there is a RDEPENDS_pkg = "python" in the recipe.
for py in [ d.getVar('MLPREFIX', True) + "python", "python" ]:
if py in done:
- filerdepends.discard("/usr/bin/python")
+ filerdepends.pop("/usr/bin/python",None)
done.remove(py)
for rdep in done:
# For Saving the FILERPROVIDES, RPROVIDES and FILES_INFO
- rdep_rprovides = set()
rdep_data = oe.packagedata.read_subpkgdata(rdep, d)
for key in rdep_data:
if key.startswith("FILERPROVIDES_") or key.startswith("RPROVIDES_"):
for subkey in rdep_data[key].split():
- rdep_rprovides.add(subkey)
+ filerdepends.pop(subkey,None)
# Add the files list to the rprovides
if key == "FILES_INFO":
# Use eval() to make it as a dict
for subkey in eval(rdep_data[key]):
- rdep_rprovides.add(subkey)
- filerdepends -= rdep_rprovides
+ filerdepends.pop(subkey,None)
if not filerdepends:
# Break if all the file rdepends are met
break
- else:
- # Clear it for the next loop
- rdep_rprovides.clear()
if filerdepends:
- error_msg = "%s requires %s, but no providers in its RDEPENDS" % \
- (pkg, ', '.join(str(e) for e in filerdepends))
+ for key in filerdepends:
+ error_msg = "%s contained in package %s requires %s, but no providers found in its RDEPENDS" % \
+ (filerdepends[key],pkg, key)
sane = package_qa_handle_error("file-rdeps", error_msg, d)
return sane