diff options
author | Ross Burton <ross.burton@arm.com> | 2023-12-08 10:56:55 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-12-09 19:17:11 +0000 |
commit | 0b4a4952e145dd9cfd77724731c600f2af28987f (patch) | |
tree | 73c7cf69855a3abfbaf83c4709b13ef232911db2 /meta/classes-global | |
parent | c2f44a6e97397f5f3e8ff141874d733ca4a22d77 (diff) | |
download | poky-0b4a4952e145dd9cfd77724731c600f2af28987f.tar.gz |
insane: ensure more paths have the workdir removed
When showing paths to the user we don't want to include the whole build
directory. Passing the package name to package_qa_clean_path strips
this completely.
(From OE-Core rev: 7f1a862d2a432f216e37bf63648bef787422a43d)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes-global')
-rw-r--r-- | meta/classes-global/insane.bbclass | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/meta/classes-global/insane.bbclass b/meta/classes-global/insane.bbclass index b78bb6f445..72fcf6b254 100644 --- a/meta/classes-global/insane.bbclass +++ b/meta/classes-global/insane.bbclass | |||
@@ -104,7 +104,7 @@ def package_qa_check_shebang_size(path, name, d, elf, messages): | |||
104 | return | 104 | return |
105 | 105 | ||
106 | if len(stanza) > 129: | 106 | if len(stanza) > 129: |
107 | oe.qa.add_message(messages, "shebang-size", "%s: %s maximum shebang size exceeded, the maximum size is 128." % (name, package_qa_clean_path(path, d))) | 107 | oe.qa.add_message(messages, "shebang-size", "%s: %s maximum shebang size exceeded, the maximum size is 128." % (name, package_qa_clean_path(path, d, name))) |
108 | return | 108 | return |
109 | 109 | ||
110 | QAPATHTEST[libexec] = "package_qa_check_libexec" | 110 | QAPATHTEST[libexec] = "package_qa_check_libexec" |
@@ -116,7 +116,7 @@ def package_qa_check_libexec(path,name, d, elf, messages): | |||
116 | return True | 116 | return True |
117 | 117 | ||
118 | if 'libexec' in path.split(os.path.sep): | 118 | if 'libexec' in path.split(os.path.sep): |
119 | oe.qa.add_message(messages, "libexec", "%s: %s is using libexec please relocate to %s" % (name, package_qa_clean_path(path, d), libexec)) | 119 | oe.qa.add_message(messages, "libexec", "%s: %s is using libexec please relocate to %s" % (name, package_qa_clean_path(path, d, name), libexec)) |
120 | return False | 120 | return False |
121 | 121 | ||
122 | return True | 122 | return True |
@@ -208,7 +208,7 @@ def package_qa_check_staticdev(path, name, d, elf, messages): | |||
208 | 208 | ||
209 | if not name.endswith("-pic") and not name.endswith("-staticdev") and not name.endswith("-ptest") and path.endswith(".a") and not path.endswith("_nonshared.a") and not '/usr/lib/debug-static/' in path and not '/.debug-static/' in path: | 209 | if not name.endswith("-pic") and not name.endswith("-staticdev") and not name.endswith("-ptest") and path.endswith(".a") and not path.endswith("_nonshared.a") and not '/usr/lib/debug-static/' in path and not '/.debug-static/' in path: |
210 | oe.qa.add_message(messages, "staticdev", "non -staticdev package contains static .a library: %s path '%s'" % \ | 210 | oe.qa.add_message(messages, "staticdev", "non -staticdev package contains static .a library: %s path '%s'" % \ |
211 | (name, package_qa_clean_path(path,d, name))) | 211 | (name, package_qa_clean_path(path, d, name))) |
212 | 212 | ||
213 | QAPATHTEST[mime] = "package_qa_check_mime" | 213 | QAPATHTEST[mime] = "package_qa_check_mime" |
214 | def package_qa_check_mime(path, name, d, elf, messages): | 214 | def package_qa_check_mime(path, name, d, elf, messages): |
@@ -219,7 +219,7 @@ def package_qa_check_mime(path, name, d, elf, messages): | |||
219 | 219 | ||
220 | if d.getVar("datadir") + "/mime/packages" in path and path.endswith('.xml') and not bb.data.inherits_class("mime", d): | 220 | if d.getVar("datadir") + "/mime/packages" in path and path.endswith('.xml') and not bb.data.inherits_class("mime", d): |
221 | oe.qa.add_message(messages, "mime", "package contains mime types but does not inherit mime: %s path '%s'" % \ | 221 | oe.qa.add_message(messages, "mime", "package contains mime types but does not inherit mime: %s path '%s'" % \ |
222 | (name, package_qa_clean_path(path,d))) | 222 | (name, package_qa_clean_path(path, d, name))) |
223 | 223 | ||
224 | QAPATHTEST[mime-xdg] = "package_qa_check_mime_xdg" | 224 | QAPATHTEST[mime-xdg] = "package_qa_check_mime_xdg" |
225 | def package_qa_check_mime_xdg(path, name, d, elf, messages): | 225 | def package_qa_check_mime_xdg(path, name, d, elf, messages): |
@@ -239,7 +239,7 @@ def package_qa_check_mime_xdg(path, name, d, elf, messages): | |||
239 | except: | 239 | except: |
240 | # At least libreoffice installs symlinks with absolute paths that are dangling here. | 240 | # At least libreoffice installs symlinks with absolute paths that are dangling here. |
241 | # We could implement some magic but for few (one) recipes it is not worth the effort so just warn: | 241 | # We could implement some magic but for few (one) recipes it is not worth the effort so just warn: |
242 | wstr = "%s cannot open %s - is it a symlink with absolute path?\n" % (name, package_qa_clean_path(path,d)) | 242 | wstr = "%s cannot open %s - is it a symlink with absolute path?\n" % (name, package_qa_clean_path(path, d, name)) |
243 | wstr += "Please check if (linked) file contains key 'MimeType'.\n" | 243 | wstr += "Please check if (linked) file contains key 'MimeType'.\n" |
244 | pkgname = name | 244 | pkgname = name |
245 | if name == d.getVar('PN'): | 245 | if name == d.getVar('PN'): |
@@ -247,8 +247,8 @@ def package_qa_check_mime_xdg(path, name, d, elf, messages): | |||
247 | wstr += "If yes: add \'inhert mime-xdg\' and \'MIME_XDG_PACKAGES += \"%s\"\' / if no add \'INSANE_SKIP:%s += \"mime-xdg\"\' to recipe." % (pkgname, pkgname) | 247 | wstr += "If yes: add \'inhert mime-xdg\' and \'MIME_XDG_PACKAGES += \"%s\"\' / if no add \'INSANE_SKIP:%s += \"mime-xdg\"\' to recipe." % (pkgname, pkgname) |
248 | oe.qa.add_message(messages, "mime-xdg", wstr) | 248 | oe.qa.add_message(messages, "mime-xdg", wstr) |
249 | if mime_type_found: | 249 | if mime_type_found: |
250 | oe.qa.add_message(messages, "mime-xdg", "package contains desktop file with key 'MimeType' but does not inhert mime-xdg: %s path '%s'" % \ | 250 | oe.qa.add_message(messages, "mime-xdg", "%s: contains desktop file with key 'MimeType' but does not inhert mime-xdg: %s" % \ |
251 | (name, package_qa_clean_path(path,d))) | 251 | (name, package_qa_clean_path(path, d, name))) |
252 | 252 | ||
253 | def package_qa_check_libdir(d): | 253 | def package_qa_check_libdir(d): |
254 | """ | 254 | """ |
@@ -321,8 +321,8 @@ def package_qa_check_dbg(path, name, d, elf, messages): | |||
321 | 321 | ||
322 | if not "-dbg" in name and not "-ptest" in name: | 322 | if not "-dbg" in name and not "-ptest" in name: |
323 | if '.debug' in path.split(os.path.sep): | 323 | if '.debug' in path.split(os.path.sep): |
324 | oe.qa.add_message(messages, "debug-files", "non debug package contains .debug directory: %s path %s" % \ | 324 | oe.qa.add_message(messages, "debug-files", "%s: non debug package contains .debug directory %s" % \ |
325 | (name, package_qa_clean_path(path,d))) | 325 | (name, package_qa_clean_path(path, d, name))) |
326 | 326 | ||
327 | QAPATHTEST[arch] = "package_qa_check_arch" | 327 | QAPATHTEST[arch] = "package_qa_check_arch" |
328 | def package_qa_check_arch(path,name,d, elf, messages): | 328 | def package_qa_check_arch(path,name,d, elf, messages): |
@@ -371,7 +371,7 @@ def package_qa_check_arch(path,name,d, elf, messages): | |||
371 | (elf.abiSize(), bits, package_qa_clean_path(path, d, name))) | 371 | (elf.abiSize(), bits, package_qa_clean_path(path, d, name))) |
372 | elif not ((littleendian == elf.isLittleEndian()) or is_bpf): | 372 | elif not ((littleendian == elf.isLittleEndian()) or is_bpf): |
373 | oe.qa.add_message(messages, "arch", "Endiannes did not match (%d, expected %d) in %s" % \ | 373 | oe.qa.add_message(messages, "arch", "Endiannes did not match (%d, expected %d) in %s" % \ |
374 | (elf.isLittleEndian(), littleendian, package_qa_clean_path(path,d, name))) | 374 | (elf.isLittleEndian(), littleendian, package_qa_clean_path(path, d, name))) |
375 | 375 | ||
376 | QAPATHTEST[desktop] = "package_qa_check_desktop" | 376 | QAPATHTEST[desktop] = "package_qa_check_desktop" |
377 | def package_qa_check_desktop(path, name, d, elf, messages): | 377 | def package_qa_check_desktop(path, name, d, elf, messages): |