[pkg-freevo-commits] r201 - in packages/kaa-base/trunk/debian: . patches

Andrea Mennucci mennucc1 at alioth.debian.org
Fri Mar 26 11:45:34 UTC 2010


Author: mennucc1
Date: 2010-03-26 11:45:33 +0000 (Fri, 26 Mar 2010)
New Revision: 201

Added:
   packages/kaa-base/trunk/debian/patches/004_ia64_libc.patch
Modified:
   packages/kaa-base/trunk/debian/changelog
   packages/kaa-base/trunk/debian/patches/series
Log:
new version 0.6.0-5


Modified: packages/kaa-base/trunk/debian/changelog
===================================================================
--- packages/kaa-base/trunk/debian/changelog	2010-03-13 17:14:20 UTC (rev 200)
+++ packages/kaa-base/trunk/debian/changelog	2010-03-26 11:45:33 UTC (rev 201)
@@ -1,3 +1,10 @@
+kaa-base (0.6.0-5) unstable; urgency=medium
+
+  * fix integration with twisted, thanks to Alexandre Rossi
+    and Mickael Royer (Closes: #575293).
+
+ -- A Mennucc1 <mennucc1 at debian.org>  Fri, 26 Mar 2010 12:06:58 +0100
+
 kaa-base (0.6.0-4) unstable; urgency=low
 
   * REALLY use ctypes.util.find_library to find libc,

Added: packages/kaa-base/trunk/debian/patches/004_ia64_libc.patch
===================================================================
--- packages/kaa-base/trunk/debian/patches/004_ia64_libc.patch	                        (rev 0)
+++ packages/kaa-base/trunk/debian/patches/004_ia64_libc.patch	2010-03-26 11:45:33 UTC (rev 201)
@@ -0,0 +1,74 @@
+Description: 
+ Use the ctypes.util.find_library call to find libc. This way
+ many different architectures are supported.
+
+ Note this important fact.
+ When kaa is imported, ctypes.util.find_library is called,
+ and it uses os.popen which emits a SIGCHLD; so the handler must be
+ connected *after* the call to ctypes.util.find_library . Otherwise
+ os.popen triggers the handler that forces the kaa notifier
+ initialization; so when we try to select a notifier after the import,
+ an exception is raised because kaa notifier is already initialized;
+ this breaks twisted integration.
+
+Bug-Debian: http://bugs.debian.org/566902
+Bug-Debian: http://bugs.debian.org/575293
+Forwarded: not yet
+Author: A Mennucc
+Author: Alexandre Rossi
+Thanks: Mickael Royer
+Thanks: KiBi
+Last-Update: 2010-03-25
+
+diff -u kaa-base-0.6.0/src/process.py kaa-base-0.6.0.new//src/process.py  2010-03-25 23:15:37.000000000 +0100
+--- kaa-base-0.6.0/src/process.py	2010-03-13 17:57:05.000000000 +0100
++++ kaa-base-0.6.0.new//src/process.py  2010-03-25 23:15:37.000000000 +0100
+@@ -28,6 +28,7 @@
+ 
+ import subprocess
+ import os
++import sys
+ import shlex
+ import errno
+ import logging
+@@ -60,7 +61,6 @@
+     def __init__(self):
+         self.processes = {}
+ 
+-        signal.signal(signal.SIGCHLD, self._sigchld_handler)
+         # Set SA_RESTART bit for the signal, which restarts any interrupted
+         # system calls -- however, select (at least on Linux) is NOT restarted
+         # for reasons described at:
+@@ -68,17 +68,23 @@
+         #
+         # Therefore the purpose of signal.set_wakeup_fd() eludes me, since
+         # select calls get interrupted, there is no need to wake it up.
+-        try:
++        v = sys.version_info
++        if v[0] >= 3 or (v[0] == 2 and v[1] >= 6):
+             # Python 2.6+
++            signal.signal(signal.SIGCHLD, self._sigchld_handler)
+             signal.siginterrupt(signal.SIGCHLD, False)
+-        except AttributeError:
+-            try:
+-                # Python 2.5
+-                import ctypes
+-                ctypes.CDLL("libc.so.6").siginterrupt(signal.SIGCHLD, 0)
+-            except (ImportError, OSError):
+-                # Python 2.4- is not supported.
+-                raise SystemError('kaa.base requires Python 2.5 or later')
++        elif v[0] == 2 and v[1] == 5:
++            # Python 2.5
++            import ctypes, ctypes.util
++            libc=ctypes.util.find_library('c')
++            # ctypes.util.find_library() involves a child process, so the
++            # handler should be set after the call.
++	     # See Debian bug #575293
++            signal.signal(signal.SIGCHLD, self._sigchld_handler)
++            ctypes.CDLL(libc).siginterrupt(signal.SIGCHLD, 0)
++        else:
++            # Python 2.4- is not supported.
++            raise SystemError('kaa.base requires Python 2.5 or later')
+         
+ 
+     def register(self, process):

Modified: packages/kaa-base/trunk/debian/patches/series
===================================================================
--- packages/kaa-base/trunk/debian/patches/series	2010-03-13 17:14:20 UTC (rev 200)
+++ packages/kaa-base/trunk/debian/patches/series	2010-03-26 11:45:33 UTC (rev 201)
@@ -1,2 +1,3 @@
 #001_remove-useless-shebangs.patch
-002_ia64_libc.patch
+#002_ia64_libc.patch
+004_ia64_libc.patch




More information about the Pkg-freevo-commits mailing list