Skip to contentSkip to conversation

insane.bbclass: Avoid buildpaths QA reporting on HOME if its in TMPDIR

PATCH New Peter Kjellerstedt 1 participant 1 message Nov 3

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 insane.bbclass: Avoid buildpaths QA reporting on HOME if its in TMPDIR

Since TMPDIR is typically under HOME, there is no reason to report on HOME if that is the case, and TMPDIR has already been reported.

---
 meta/classes-global/insane.bbclass | 1 +
 1 file changed, 1 insertion(+)
meta/classes-global/insane.bbclass +1 -0
index 721088a8f5..350e1f83c2 100644
@@ -443,6 +443,7 @@ def package_qa_check_buildpaths(path, name, d, elf):
         if tmpdir in file_content:
             path = package_qa_clean_path(path, d, name)
             oe.qa.handle_error("buildpaths", "File %s in package %s contains reference to TMPDIR" % (path, name), d)
+            buildpaths_skip.append(tmpdir.decode())
         if homedir and homedir in file_content and not any(path.startswith(homedir.decode()) for path in buildpaths_skip):
             path = package_qa_clean_path(path, d, name)
             oe.qa.handle_error("buildpaths", "File %s in package %s contains a reference to the build host HOME directory. If upstream hardcodes a directory path that matches your home, you can set OEQA_BUILDPATHS_SKIP = \"%s\" in the recipe." % (path, name, homedir.decode()), d)