diff options
author | Ross Burton <ross.burton@intel.com> | 2016-08-18 17:33:31 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-08-23 17:44:40 +0100 |
commit | edec1c4e1ddc986edf2bd1ea11cff9277096c8f5 (patch) | |
tree | 3f9550a7a76208cf032a59a4e89ff82b9bf8075c | |
parent | 86164406ddb8d4bb138eb3e992897f2eed422f3c (diff) | |
download | poky-edec1c4e1ddc986edf2bd1ea11cff9277096c8f5.tar.gz |
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>
-rw-r--r-- | 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 2cb8cc0abf..67729445a9 100644 --- a/meta/classes/insane.bbclass +++ b/meta/classes/insane.bbclass | |||
@@ -179,9 +179,14 @@ def package_qa_get_machine_dict(d): | |||
179 | return machdata | 179 | return machdata |
180 | 180 | ||
181 | 181 | ||
182 | def package_qa_clean_path(path,d): | 182 | def package_qa_clean_path(path, d, pkg=None): |
183 | """ Remove the common prefix from the path. In this case it is the TMPDIR""" | 183 | """ |
184 | return path.replace(d.getVar("TMPDIR", True) + "/", "") | 184 | Remove redundant paths from the path for display. If pkg isn't set then |
185 | TMPDIR is stripped, otherwise PKGDEST/pkg is stripped. | ||
186 | """ | ||
187 | if pkg: | ||
188 | path = path.replace(os.path.join(d.getVar("PKGDEST", True), pkg), "/") | ||
189 | return path.replace(d.getVar("TMPDIR", True), "/").replace("//", "/") | ||
185 | 190 | ||
186 | def package_qa_write_error(type, error, d): | 191 | def package_qa_write_error(type, error, d): |
187 | logfile = d.getVar('QA_LOGFILE', True) | 192 | logfile = d.getVar('QA_LOGFILE', True) |