summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@arm.com>2020-07-07 20:37:42 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-07-22 21:46:37 (GMT)
commit20521e221942f21f65d045622056b6b9f98e5753 (patch)
tree6b5af2558a093076326ca98784076834017d61a5 /meta/classes
parent8ed73ebee75eeb18ac016d76199a2faf9c6081c5 (diff)
downloadpoky-20521e221942f21f65d045622056b6b9f98e5753.tar.gz
insane: consolidate skipping of temporary do_package files
During the course of do_package_rpm and friends the tools create a top-level CONTROL or DEBIAN directory in the package directory. do_package_qa needs to be aware of these files and ignore them, this was previously done in just one check but instead should be done once when building the file list so all the checks don't see the temporary files. [ YOCTO #13804 ] (From OE-Core rev: 0dbdcd305a969b67415ed74c3286af02612bd64c) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 4b2f45c47a5c8c800626f12c14f216a5ab923512) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/insane.bbclass13
1 files changed, 8 insertions, 5 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 3a0efa3..1d76ae7 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -458,10 +458,6 @@ def package_qa_check_buildpaths(path, name, d, elf, messages):
458 if os.path.islink(path): 458 if os.path.islink(path):
459 return 459 return
460 460
461 # Ignore ipk and deb's CONTROL dir
462 if path.find(name + "/CONTROL/") != -1 or path.find(name + "/DEBIAN/") != -1:
463 return
464
465 tmpdir = bytes(d.getVar('TMPDIR'), encoding="utf-8") 461 tmpdir = bytes(d.getVar('TMPDIR'), encoding="utf-8")
466 with open(path, 'rb') as f: 462 with open(path, 'rb') as f:
467 file_content = f.read() 463 file_content = f.read()
@@ -1023,7 +1019,14 @@ python do_package_qa () {
1023 pkgfiles = {} 1019 pkgfiles = {}
1024 for pkg in packages: 1020 for pkg in packages:
1025 pkgfiles[pkg] = [] 1021 pkgfiles[pkg] = []
1026 for walkroot, dirs, files in os.walk(os.path.join(pkgdest, pkg)): 1022 pkgdir = os.path.join(pkgdest, pkg)
1023 for walkroot, dirs, files in os.walk(pkgdir):
1024 # Don't walk into top-level CONTROL or DEBIAN directories as these
1025 # are temporary directories created by do_package.
1026 if walkroot == pkgdir:
1027 for control in ("CONTROL", "DEBIAN"):
1028 if control in dirs:
1029 dirs.remove(control)
1027 for file in files: 1030 for file in files:
1028 pkgfiles[pkg].append(os.path.join(walkroot, file)) 1031 pkgfiles[pkg].append(os.path.join(walkroot, file))
1029 1032