]> code.ossystems Code Review - openembedded-core.git/commitdiff
smartpm: set noprogress for pycurl
authorKai Kang <kai.kang@windriver.com>
Thu, 30 Jul 2015 06:37:23 +0000 (14:37 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 31 Jul 2015 14:35:34 +0000 (15:35 +0100)
Set NOPROGRESS for pycurl just as same as default operation in pycurl
module itself. If set NOPROGRESS with 0 for pycurl, it causes dead lock
issue of Python GIL when call smart library by python gui just like
pygtk.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/recipes-devtools/python/python-smartpm/smart-set-noprogress-for-pycurl.patch [new file with mode: 0644]
meta/recipes-devtools/python/python-smartpm_git.bb

diff --git a/meta/recipes-devtools/python/python-smartpm/smart-set-noprogress-for-pycurl.patch b/meta/recipes-devtools/python/python-smartpm/smart-set-noprogress-for-pycurl.patch
new file mode 100644 (file)
index 0000000..2885998
--- /dev/null
@@ -0,0 +1,20 @@
+Set NOPROGRESS for pycurl just as same as default operation in pycurl module itself.
+If set NOPROGRESS with 0 for pycurl, it causes dead lock issue of Python GIL when
+call smart library by python gui just like pygtk.
+
+Upstream-Status: Pending
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+diff -u smart-1.4.1/smart.orig/fetcher.py smart-1.4.1/smart/fetcher.py
+--- smart-1.4.1/smart.orig/fetcher.py  2014-07-15 16:42:19.240437080 +0800
++++ smart-1.4.1/smart/fetcher.py       2014-07-15 17:02:37.812470289 +0800
+@@ -1720,7 +1720,7 @@
+                         handle.setopt(pycurl.OPT_FILETIME, 1)
+                         handle.setopt(pycurl.LOW_SPEED_LIMIT, 1)
+                         handle.setopt(pycurl.LOW_SPEED_TIME, SOCKETTIMEOUT)
+-                        handle.setopt(pycurl.NOPROGRESS, 0)
++                        handle.setopt(pycurl.NOPROGRESS, 1)
+                         handle.setopt(pycurl.PROGRESSFUNCTION, progress)
+                         handle.setopt(pycurl.WRITEDATA, local)
+                         handle.setopt(pycurl.FOLLOWLOCATION, 1)
index 163461e5923517973883dd6da8ef84dcd75be703..8b974b0c33f6d20cbd321584e19710275fe3c9a2 100644 (file)
@@ -22,6 +22,7 @@ SRC_URI = "\
           file://smart-rpm4-fixes.patch \
           file://smart-add-for-rpm-ignoresize-check.patch \
           file://smart-already-installed-message.patch \
+          file://smart-set-noprogress-for-pycurl.patch \
          "
 
 SRCREV = "407a7eca766431257dcd1da15175cc36a1bb22d0"