summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/insane.bbclass47
1 files changed, 45 insertions, 2 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index a2adfee835..de64523051 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -27,7 +27,7 @@ WARN_QA ?= "ldflags useless-rpaths rpaths staticdev libdir xorg-driver-abi \
installed-vs-shipped compile-host-path install-host-path \
pn-overrides infodir build-deps \
unknown-configure-option symlink-to-sysroot multilib \
- invalid-packageconfig host-user-contaminated uppercase-pn \
+ invalid-packageconfig host-user-contaminated uppercase-pn qa-pseudo \
"
ERROR_QA ?= "dev-so debug-deps dev-deps debug-files arch pkgconfig la \
perms dep-cmp pkgvarcheck perm-config perm-line perm-link \
@@ -349,7 +349,7 @@ def package_qa_textrel(path, name, d, elf, messages):
sane = False
if not sane:
- package_qa_add_message(messages, "textrel", "ELF binary '%s' has relocations in .text" % path)
+ package_qa_add_message(messages, "textrel", "ELF binary '%s' has relocations in .text" % package_qa_clean_path(path, d))
QAPATHTEST[ldflags] = "package_qa_hash_style"
def package_qa_hash_style(path, name, d, elf, messages):
@@ -1150,6 +1150,44 @@ python do_qa_unpack() {
bb.warn('%s: the directory %s (%s) pointed to by the S variable doesn\'t exist - please set S within the recipe to point to where the source has been unpacked to' % (d.getVar('PN'), d.getVar('S', False), s_dir))
}
+python do_qa_pseudo() {
+ ###########################################################################
+ # Check pseudo.log for unexpected errors
+ #
+ # Typical pseudo.log contains many "^path mismatch" lines for all the hardlinked files
+ # e.g. in some smaller component I see 231/237 lines to be "^path mismatch" other 6
+ # lines are setup and cleanup lines like this:
+ # debug_logfile: fd 2
+ # pid 7975 [parent 7974], doing new pid setup and server start
+ # Setup complete, sending SIGUSR1 to pid 7974.
+ # db cleanup for server shutdown, 17:33:58.787
+ # memory-to-file backup complete, 17:33:58.787.
+ # db cleanup finished, 17:33:58.787
+ #
+ # but if there is one of:
+ # "^inode mismatch"
+ # "^creat ignored for existing file"
+ # "^creat for.*replaces existing"
+ # then there might be some bigger issue which sometimes results in host-user-contaminated QA warnings
+ ###########################################################################
+
+ import subprocess
+
+ pseudodir = d.getVar('PSEUDO_LOCALSTATEDIR')
+ bb.note("Checking pseudo.log for common errors")
+ pseudolog = os.path.join(pseudodir, "pseudo.log")
+ statement = "grep" \
+ " -e '^creat ignored for existing file'" \
+ " -e '^creat for.*replaces existing'" \
+ " %s" % pseudolog
+ if subprocess.call("%s -q" % statement, shell=True) == 0:
+ statement2 = "grep -v '^path mismatch' %s" % pseudolog
+ statement2_count = "grep -v '^path mismatch' -c %s" % pseudolog
+ output = subprocess.check_output(statement2, shell=True).decode("utf-8")
+ output_count = subprocess.check_output(statement2_count, shell=True).decode("utf-8").replace('\n', '')
+ package_qa_handle_error("qa-pseudo", "This %s indicates %s errors [qa-pseudo]\nsee %s or %s: %s" % (package_qa_clean_path(pseudolog, d), output_count, statement, statement2, output), d)
+}
+
# The Staging Func, to check all staging
#addtask qa_staging after do_populate_sysroot before do_build
do_populate_sysroot[postfuncs] += "do_qa_staging "
@@ -1162,6 +1200,11 @@ do_configure[postfuncs] += "do_qa_configure "
# Check does S exist.
do_unpack[postfuncs] += "do_qa_unpack"
+# Check pseudo.log for unexpected errors
+# For some reason do_build postfunction isn't executed
+# do_build[postfuncs] += "do_qa_pseudo"
+addtask do_qa_pseudo after do_populate_sysroot do_packagedata do_package before do_build
+
python () {
import re