[gnome-continuous-yocto/gnomeostree-3.28-rocko: 2022/8267] insane: improve package_qa_clean_path
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 2022/8267] insane: improve package_qa_clean_path
- Date: Sat, 16 Dec 2017 22:38:47 +0000 (UTC)
commit edec1c4e1ddc986edf2bd1ea11cff9277096c8f5
Author: Ross Burton <ross burton intel com>
Date: Thu Aug 18 17:33:31 2016 +0100
insane: improve package_qa_clean_path
Instead of just removing TMPDIR from the path for display, optionally allow a
package to be passed and remove PKGDEST/package too.
This means that messages that specify a package name can pass that name and the
resulting path will be absolute inside that package.
(From OE-Core rev: 55061a43926baf6ff0e17aed02efd299ebba3c24)
Signed-off-by: Ross Burton <ross burton intel com>
Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>
meta/classes/insane.bbclass | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 2cb8cc0..6772944 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -179,9 +179,14 @@ def package_qa_get_machine_dict(d):
return machdata
-def package_qa_clean_path(path,d):
- """ Remove the common prefix from the path. In this case it is the TMPDIR"""
- return path.replace(d.getVar("TMPDIR", True) + "/", "")
+def package_qa_clean_path(path, d, pkg=None):
+ """
+ Remove redundant paths from the path for display. If pkg isn't set then
+ TMPDIR is stripped, otherwise PKGDEST/pkg is stripped.
+ """
+ if pkg:
+ path = path.replace(os.path.join(d.getVar("PKGDEST", True), pkg), "/")
+ return path.replace(d.getVar("TMPDIR", True), "/").replace("//", "/")
def package_qa_write_error(type, error, d):
logfile = d.getVar('QA_LOGFILE', True)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]