[arch-commits] CVS update of extra/devel/python (2 files)

andyrtr at archlinux.org andyrtr at archlinux.org
Sat Feb 23 20:44:38 UTC 2008


    Date: Saturday, February 23, 2008 @ 15:44:38
  Author: andyrtr
    Path: /home/cvs-extra/extra/devel/python

Modified: PKGBUILD (1.50 -> 1.51) python2.6-set_wakeup_fd4.patch (1.1 -> 1.2)

upgpkg: python 2.5.2-1


--------------------------------+
 PKGBUILD                       |   15 ++++-------
 python2.6-set_wakeup_fd4.patch |   50 ++++++++++++++++++++++-----------------
 2 files changed, 35 insertions(+), 30 deletions(-)


Index: extra/devel/python/PKGBUILD
diff -u extra/devel/python/PKGBUILD:1.50 extra/devel/python/PKGBUILD:1.51
--- extra/devel/python/PKGBUILD:1.50	Thu Jan 10 12:43:41 2008
+++ extra/devel/python/PKGBUILD	Sat Feb 23 15:44:38 2008
@@ -1,8 +1,8 @@
-# $Id: PKGBUILD,v 1.50 2008/01/10 17:43:41 jgc Exp $
+# $Id: PKGBUILD,v 1.51 2008/02/23 20:44:38 andyrtr Exp $
 # Maintainer: Jason Chu <jason at archlinux.org>
 pkgname=python
-pkgver=2.5.1
-pkgrel=5
+pkgver=2.5.2
+pkgrel=1
 _pybasever=2.5
 pkgdesc="A high-level scripting language"
 arch=('i686' 'x86_64')
@@ -15,23 +15,20 @@
 replaces=('python-ctypes')
 source=(http://www.python.org/ftp/python/${pkgver}/Python-${pkgver}.tar.bz2
 	Python-2.4.4-gdbm-1.patch
-	db4.6-setup.py-detection.patch
 	python-2.5.CVE-2007-4965-int-overflow.patch
 	python2.6-set_wakeup_fd4.patch)
-md5sums=('70084ffa561660f07de466c2c8c4842d'
+md5sums=('afb5451049eda91fbde10bd5a4b7fadc'
          '2b61e06365e9fb5f3af22d946efa8be6'
-         '599fc8d1cb63a406d46e30c7e4b62a29'
          '491416c1b337fc61b6cdf5981d895a7d'
-	 'e9f8c840ba4a2bf1ea73102fd333352e')
+         'ec56710959deb01b5fa35829cafec6a3')
 
 build() {
   cd ${startdir}/src/Python-${pkgver}
   patch -Np1 -i ${startdir}/src/Python-2.4.4-gdbm-1.patch || return 1
-  patch -Np0 -i ${startdir}/src/db4.6-setup.py-detection.patch || return 1
   # fix http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-4965
   patch -Np1 -i ${startdir}/src//python-2.5.CVE-2007-4965-int-overflow.patch || return 1
 
-  patch -Np1 -i ${startdir}/src/python2.6-set_wakeup_fd4.patch || return 1
+  patch -Np2 -i ${startdir}/src/python2.6-set_wakeup_fd4.patch || return 1
 
   ./configure --prefix=/usr --enable-shared --with-threads --enable-unicode
   # This is supposed to be the previous version's python directory
Index: extra/devel/python/python2.6-set_wakeup_fd4.patch
diff -u extra/devel/python/python2.6-set_wakeup_fd4.patch:1.1 extra/devel/python/python2.6-set_wakeup_fd4.patch:1.2
--- extra/devel/python/python2.6-set_wakeup_fd4.patch:1.1	Thu Jan 10 12:43:42 2008
+++ extra/devel/python/python2.6-set_wakeup_fd4.patch	Sat Feb 23 15:44:38 2008
@@ -1,6 +1,5 @@
-diff -rup Python-2.5.1-orig/Modules/signalmodule.c Python-2.5.1/Modules/signalmodule.c
---- Python-2.5.1-orig/Modules/signalmodule.c	2006-01-19 01:09:39.000000000 -0500
-+++ Python-2.5.1/Modules/signalmodule.c	2008-01-07 12:32:00.000000000 -0500
+--- python/trunk/Modules/signalmodule.c	2007/12/10 23:00:12	59460
++++ python/trunk/Modules/signalmodule.c	2007/12/19 19:41:06	59574
 @@ -12,6 +12,8 @@
  
  #include <signal.h>
@@ -10,33 +9,25 @@
  #ifndef SIG_ERR
  #define SIG_ERR ((PyOS_sighandler_t)(-1))
  #endif
-@@ -75,6 +77,8 @@ static struct {
+@@ -75,6 +77,8 @@
          PyObject *func;
  } Handlers[NSIG];
  
-+static int wakeup_fd = -1;
++static sig_atomic_t wakeup_fd = -1;
 +
- static int is_tripped = 0; /* Speed up sigcheck() when none tripped */
+ /* Speed up sigcheck() when none tripped */
+ static volatile sig_atomic_t is_tripped = 0;
  
- static PyObject *DefaultHandler;
-@@ -112,6 +116,7 @@ checksignals_witharg(void * unused)
- static void
- signal_handler(int sig_num)
- {
-+	const char dummy_byte = '\0';
- #ifdef WITH_THREAD
- #ifdef WITH_PTH
- 	if (PyThread_get_thread_ident() != main_thread) {
-@@ -125,6 +130,8 @@ signal_handler(int sig_num)
- 		is_tripped++;
- 		Handlers[sig_num].tripped = 1;
+@@ -128,6 +132,8 @@
+                    cleared in PyErr_CheckSignals() before .tripped. */
+ 		is_tripped = 1;
  		Py_AddPendingCall(checksignals_witharg, NULL);
 +		if (wakeup_fd != -1)
-+			write(wakeup_fd, &dummy_byte, 1);
++			write(wakeup_fd, "\0", 1);
  #ifdef WITH_THREAD
  	}
  #endif
-@@ -264,6 +271,39 @@ None -- if an unknown handler is in effe
+@@ -267,6 +273,50 @@
  anything else -- the callable Python object used as a handler");
  
  
@@ -72,11 +63,22 @@
 +\n\
 +The fd must be non-blocking.");
 +
++/* C API for the same, without all the error checking */
++int
++PySignal_SetWakeupFd(int fd)
++{
++	int old_fd = wakeup_fd;
++	if (fd < 0)
++		fd = -1;
++	wakeup_fd = fd;
++	return old_fd;
++}
++
 +
  /* List of functions defined in the module */
  static PyMethodDef signal_methods[] = {
  #ifdef HAVE_ALARM
-@@ -271,6 +311,7 @@ static PyMethodDef signal_methods[] = {
+@@ -274,11 +324,12 @@
  #endif
  	{"signal",	        signal_signal, METH_VARARGS, signal_doc},
  	{"getsignal",	        signal_getsignal, METH_VARARGS, getsignal_doc},
@@ -84,3 +86,9 @@
  #ifdef HAVE_PAUSE
  	{"pause",	        (PyCFunction)signal_pause,
  	 METH_NOARGS,pause_doc},
+ #endif
+-	{"default_int_handler", signal_default_int_handler, 
++	{"default_int_handler", signal_default_int_handler,
+ 	 METH_VARARGS, default_int_handler_doc},
+ 	{NULL,			NULL}		/* sentinel */
+ };




More information about the arch-commits mailing list