summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorMariano Lopez <mariano.lopez@linux.intel.com>2016-08-03 13:21:30 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-09-23 15:27:05 +0100
commite588da43b0299d13a70dcee02488cca3d7b52541 (patch)
treec39a24aa76f5a70e8c2bfa50c96674847879c418 /meta/recipes-devtools
parentc32c7522e5ccf52c443cb1d8c9508bd653f0d7cc (diff)
downloadpoky-e588da43b0299d13a70dcee02488cca3d7b52541.tar.gz
python-smartpm_git.bb: Add patch for debugging random errors
This will add a patch to debug random errors seen in the autobuilders, it won't solve the errors, but will give us a better idea of what is happening. [YOCTO #8383] (From OE-Core rev: c52a7e910a3a52a7455a2409d9ade449bbbd66d4) (From OE-Core rev: 8d46dc71cead3779f00537e0cace577767304f75) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/python/python-smartpm/smart-add-deugging-when-targetpath-is-empty.patch47
-rw-r--r--meta/recipes-devtools/python/python-smartpm_git.bb1
2 files changed, 48 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python-smartpm/smart-add-deugging-when-targetpath-is-empty.patch b/meta/recipes-devtools/python/python-smartpm/smart-add-deugging-when-targetpath-is-empty.patch
new file mode 100644
index 0000000000..5e80804bf4
--- /dev/null
+++ b/meta/recipes-devtools/python/python-smartpm/smart-add-deugging-when-targetpath-is-empty.patch
@@ -0,0 +1,47 @@
1From 01e51afd03131947f8d74b9a23fdbc0078249499 Mon Sep 17 00:00:00 2001
2From: Mariano Lopez <mariano.lopez@linux.intel.com>
3Date: Wed, 3 Aug 2016 07:47:09 +0000
4Subject: [PATCH] fetcher.py: Add debugging when targetpath is empty
5
6There are several errors when openining files or manipulating
7path strings, those errors point targetpath passed to
8setSucceeded() is empty. This patch won't solve the problems,
9but will add debugging to give an idea why is failing.
10
11Upstream-Status: Inappropriate [debugging]
12
13Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
14---
15 smart/fetcher.py | 16 ++++++++++++++++
16 1 file changed, 16 insertions(+)
17
18diff --git a/smart/fetcher.py b/smart/fetcher.py
19index dd3ff6b..64aa979 100644
20--- a/smart/fetcher.py
21+++ b/smart/fetcher.py
22@@ -594,6 +594,22 @@ class FetchItem(object):
23 self._eta = None
24
25 def setSucceeded(self, targetpath, fetchedsize=0):
26+ # It seems the in some odd cases targetpath here
27+ # is empty, this will lead to bugs in several places
28+ if not targetpath:
29+ import traceback
30+ tb_str = ""
31+ for threadId, stack in sys._current_frames().items():
32+ tb_str += '\nThreadID: %s' % threadId
33+ for filename, lineno, name, line in traceback.extract_stack(stack):
34+ tb_str += '\nFile: "%s", line %d, in %s' % (filename, lineno, name)
35+ if line:
36+ tb_str += "\n %s" % line.strip()
37+ error_string = ["No file path specified",
38+ "URL: %s" % self._url,
39+ "Status: %s" % self._status,
40+ "Traceback: %s" % tb_str]
41+ raise Error, _("\n".join(error_string))
42 if self._status is not FAILED:
43 self._status = SUCCEEDED
44 self._targetpath = targetpath
45--
462.6.6
47
diff --git a/meta/recipes-devtools/python/python-smartpm_git.bb b/meta/recipes-devtools/python/python-smartpm_git.bb
index 53e651a824..e6dd02ed5e 100644
--- a/meta/recipes-devtools/python/python-smartpm_git.bb
+++ b/meta/recipes-devtools/python/python-smartpm_git.bb
@@ -25,6 +25,7 @@ SRC_URI = "\
25 file://smart-channel-remove-all.patch \ 25 file://smart-channel-remove-all.patch \
26 file://smart-locale.patch \ 26 file://smart-locale.patch \
27 file://smartpm-rpm5-support-check-signatures.patch \ 27 file://smartpm-rpm5-support-check-signatures.patch \
28 file://smart-add-deugging-when-targetpath-is-empty.patch \
28 " 29 "
29 30
30SRCREV = "407a7eca766431257dcd1da15175cc36a1bb22d0" 31SRCREV = "407a7eca766431257dcd1da15175cc36a1bb22d0"