summaryrefslogtreecommitdiff
path: root/packages/python
diff options
context:
space:
mode:
authorMichael 'Mickey' Lauer <mickey@vanille-media.de>2008-10-18 17:52:12 +0200
committerMichael 'Mickey' Lauer <mickey@vanille-media.de>2008-10-19 17:48:38 +0200
commitab89422c10edc0f99912e5c9ab51cbd363171d58 (patch)
tree153fa21657fabb8b4807786d8b589bd29c49eeac /packages/python
parent33520096dcbe4dc405a372aa345e3527e5a73a7a (diff)
python 2.5.2: add some patches from pymaemo, remove old-and-deprecated package
Diffstat (limited to 'packages/python')
-rw-r--r--packages/python/python-2.5-manifest.inc27
-rw-r--r--packages/python/python-2.5.2/05-install.patch13
-rw-r--r--packages/python/python-2.5.2/06-fix-urllib-exception.patch13
-rw-r--r--packages/python/python-2.5.2/13-set-wakeup-fix.patch87
-rw-r--r--packages/python/python-2.5.2/14-encodings-oriental.patch64
-rw-r--r--packages/python/python-2.5.2/16-bug1179-imageop.patch219
-rw-r--r--packages/python/python_2.5.2.bb28
7 files changed, 425 insertions, 26 deletions
diff --git a/packages/python/python-2.5-manifest.inc b/packages/python/python-2.5-manifest.inc
index 827105ce69..4142a4b620 100644
--- a/packages/python/python-2.5-manifest.inc
+++ b/packages/python/python-2.5-manifest.inc
@@ -1,12 +1,12 @@
# WARNING: This file is AUTO GENERATED: Manual edits will be lost next time I regenerate the file.
-# Generator: 'generate-manifest-2.5.py' Version 20080722 (C) 2002-2008 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
+# Generator: './generate-manifest-2.5.py' Version 20080722 (C) 2002-2008 Michael 'Mickey' Lauer <mlauer@vanille-media.de>
# Visit the Python for Embedded Systems Site => http://www.Vanille.de/projects/python.spy
-PROVIDES+="python-profile python-threading python-distutils python-doctest python-codecs python-ctypes python-pickle python-bzip2 python-datetime python-core python-io python-compiler python-compression python-re python-xmlrpc python-terminal python-email python-image python-tests python-core-dbg python-resource python-devel python-difflib python-math python-syslog python-hotshot python-unixadmin python-textutils python-tkinter python-gdbm python-elementtree python-fcntl python-netclient python-pprint python-netserver python-curses python-smtpd python-html python-readline python-subprocess python-pydoc python-logging python-mailbox python-xml python-mime python-sqlite3 python-sqlite3-tests python-unittest python-stringold python-robotparser python-lib-old-and-deprecated python-compile python-debugger python-pkgutil python-shell python-bsddb python-mmap python-zlib python-db python-crypt python-idle python-lang python-audio "
+PROVIDES+="python-profile python-threading python-distutils python-doctest python-codecs python-ctypes python-pickle python-bzip2 python-datetime python-core python-io python-compiler python-compression python-re python-xmlrpc python-terminal python-email python-image python-tests python-core-dbg python-resource python-devel python-difflib python-math python-syslog python-hotshot python-unixadmin python-textutils python-tkinter python-gdbm python-elementtree python-fcntl python-netclient python-pprint python-netserver python-curses python-smtpd python-html python-readline python-subprocess python-pydoc python-logging python-mailbox python-xml python-mime python-sqlite3 python-sqlite3-tests python-unittest python-stringold python-robotparser python-compile python-debugger python-pkgutil python-shell python-bsddb python-mmap python-zlib python-db python-crypt python-idle python-lang python-audio "
-PACKAGES="python-profile python-threading python-distutils python-doctest python-codecs python-ctypes python-pickle python-bzip2 python-datetime python-core python-io python-compiler python-compression python-re python-xmlrpc python-terminal python-email python-image python-tests python-core-dbg python-resource python-devel python-difflib python-math python-syslog python-hotshot python-unixadmin python-textutils python-tkinter python-gdbm python-elementtree python-fcntl python-netclient python-pprint python-netserver python-curses python-smtpd python-html python-readline python-subprocess python-pydoc python-logging python-mailbox python-xml python-mime python-sqlite3 python-sqlite3-tests python-unittest python-stringold python-robotparser python-lib-old-and-deprecated python-compile python-debugger python-pkgutil python-shell python-bsddb python-mmap python-zlib python-db python-crypt python-idle python-lang python-audio "
+PACKAGES="python-profile python-threading python-distutils python-doctest python-codecs python-ctypes python-pickle python-bzip2 python-datetime python-core python-io python-compiler python-compression python-re python-xmlrpc python-terminal python-email python-image python-tests python-core-dbg python-resource python-devel python-difflib python-math python-syslog python-hotshot python-unixadmin python-textutils python-tkinter python-gdbm python-elementtree python-fcntl python-netclient python-pprint python-netserver python-curses python-smtpd python-html python-readline python-subprocess python-pydoc python-logging python-mailbox python-xml python-mime python-sqlite3 python-sqlite3-tests python-unittest python-stringold python-robotparser python-compile python-debugger python-pkgutil python-shell python-bsddb python-mmap python-zlib python-db python-crypt python-idle python-lang python-audio "
DESCRIPTION_python-profile="Python Basic Profiling Support"
PR_python-profile="ml0"
@@ -69,7 +69,7 @@ RDEPENDS_python-compiler="python-core"
FILES_python-compiler="${libdir}/python2.5/compiler "
DESCRIPTION_python-compression="Python High Level Compression Support"
-PR_python-compression="ml1"
+PR_python-compression="ml0"
RDEPENDS_python-compression="python-core python-zlib"
FILES_python-compression="${libdir}/python2.5/gzip.* ${libdir}/python2.5/zipfile.* ${libdir}/python2.5/tarfile.* "
@@ -214,7 +214,7 @@ RDEPENDS_python-pydoc="python-core python-lang python-stringold python-re"
FILES_python-pydoc="${bindir}/pydoc ${libdir}/python2.5/pydoc.* "
DESCRIPTION_python-logging="Python Logging Support"
-PR_python-logging="ml1"
+PR_python-logging="ml0"
RDEPENDS_python-logging="python-core python-io python-lang python-pickle python-stringold"
FILES_python-logging="${libdir}/python2.5/logging "
@@ -224,7 +224,7 @@ RDEPENDS_python-mailbox="python-core python-mime"
FILES_python-mailbox="${libdir}/python2.5/mailbox.* "
DESCRIPTION_python-xml="Python basic XML support."
-PR_python-xml="ml1"
+PR_python-xml="ml0"
RDEPENDS_python-xml="python-core python-re"
FILES_python-xml="${libdir}/python2.5/lib-dynload/pyexpat.so ${libdir}/python2.5/xml ${libdir}/python2.5/xmllib.* "
@@ -258,18 +258,13 @@ PR_python-robotparser="ml0"
RDEPENDS_python-robotparser="python-core python-netclient"
FILES_python-robotparser="${libdir}/python2.5/robotparser.* "
-DESCRIPTION_python-lib-old-and-deprecated="Python Deprecated Libraries"
-PR_python-lib-old-and-deprecated="ml0"
-RDEPENDS_python-lib-old-and-deprecated="python-core"
-FILES_python-lib-old-and-deprecated="${libdir}/python2.5/lib-old "
-
DESCRIPTION_python-compile="Python Bytecode Compilation Support"
PR_python-compile="ml0"
RDEPENDS_python-compile="python-core"
FILES_python-compile="${libdir}/python2.5/py_compile.* ${libdir}/python2.5/compileall.* "
DESCRIPTION_python-debugger="Python Debugger"
-PR_python-debugger="ml1"
+PR_python-debugger="ml0"
RDEPENDS_python-debugger="python-core python-io python-lang python-re python-stringold python-shell python-pprint"
FILES_python-debugger="${libdir}/python2.5/bdb.* ${libdir}/python2.5/pdb.* "
@@ -279,12 +274,12 @@ RDEPENDS_python-pkgutil="python-core"
FILES_python-pkgutil="${libdir}/python2.5/pkgutil.* "
DESCRIPTION_python-shell="Python Shell-Like Functionality"
-PR_python-shell="ml1"
+PR_python-shell="ml0"
RDEPENDS_python-shell="python-core python-re"
FILES_python-shell="${libdir}/python2.5/cmd.* ${libdir}/python2.5/commands.* ${libdir}/python2.5/dircache.* ${libdir}/python2.5/fnmatch.* ${libdir}/python2.5/glob.* ${libdir}/python2.5/popen2.* ${libdir}/python2.5/shlex.* ${libdir}/python2.5/shutil.* "
DESCRIPTION_python-bsddb="Python Berkeley Database Bindings"
-PR_python-bsddb="ml1"
+PR_python-bsddb="ml0"
RDEPENDS_python-bsddb="python-core"
FILES_python-bsddb="${libdir}/python2.5/bsddb ${libdir}/python2.5/lib-dynload/_bsddb.so "
@@ -304,7 +299,7 @@ RDEPENDS_python-db="python-core"
FILES_python-db="${libdir}/python2.5/anydbm.* ${libdir}/python2.5/dumbdbm.* ${libdir}/python2.5/whichdb.* "
DESCRIPTION_python-crypt="Python Basic Cryptographic and Hashing Support"
-PR_python-crypt="ml1"
+PR_python-crypt="ml0"
RDEPENDS_python-crypt="python-core"
FILES_python-crypt="${libdir}/python2.5/hashlib.* ${libdir}/python2.5/md5.* ${libdir}/python2.5/sha.* ${libdir}/python2.5/lib-dynload/crypt.so ${libdir}/python2.5/lib-dynload/_hashlib.so ${libdir}/python2.5/lib-dynload/_sha256.so ${libdir}/python2.5/lib-dynload/_sha512.so "
@@ -314,7 +309,7 @@ RDEPENDS_python-idle="python-core python-tkinter"
FILES_python-idle="${bindir}/idle ${libdir}/python2.5/idlelib "
DESCRIPTION_python-lang="Python Low-Level Language Support"
-PR_python-lang="ml1"
+PR_python-lang="ml0"
RDEPENDS_python-lang="python-core"
FILES_python-lang="${libdir}/python2.5/lib-dynload/array.so ${libdir}/python2.5/lib-dynload/parser.so ${libdir}/python2.5/lib-dynload/operator.so ${libdir}/python2.5/lib-dynload/_weakref.so ${libdir}/python2.5/lib-dynload/itertools.so ${libdir}/python2.5/lib-dynload/collections.so ${libdir}/python2.5/lib-dynload/_bisect.so ${libdir}/python2.5/lib-dynload/_heapq.so ${libdir}/python2.5/atexit.* ${libdir}/python2.5/bisect.* ${libdir}/python2.5/code.* ${libdir}/python2.5/codeop.* ${libdir}/python2.5/dis.* ${libdir}/python2.5/heapq.* ${libdir}/python2.5/inspect.* ${libdir}/python2.5/keyword.* ${libdir}/python2.5/opcode.* ${libdir}/python2.5/symbol.* ${libdir}/python2.5/repr.* ${libdir}/python2.5/token.* ${libdir}/python2.5/tokenize.* ${libdir}/python2.5/traceback.* ${libdir}/python2.5/linecache.* ${libdir}/python2.5/weakref.* "
diff --git a/packages/python/python-2.5.2/05-install.patch b/packages/python/python-2.5.2/05-install.patch
new file mode 100644
index 0000000000..c3e249db1c
--- /dev/null
+++ b/packages/python/python-2.5.2/05-install.patch
@@ -0,0 +1,13 @@
+Index: python/Lib/distutils/command/install.py
+===================================================================
+--- python.orig/Lib/distutils/command/install.py 2007-03-06 17:15:43.000000000 -0300
++++ python/Lib/distutils/command/install.py 2007-03-06 17:16:04.000000000 -0300
+@@ -601,7 +601,7 @@
+ ('install_headers', has_headers),
+ ('install_scripts', has_scripts),
+ ('install_data', has_data),
+- ('install_egg_info', lambda self:True),
++ ('install_egg_info', lambda self:False),
+ ]
+
+ # class install
diff --git a/packages/python/python-2.5.2/06-fix-urllib-exception.patch b/packages/python/python-2.5.2/06-fix-urllib-exception.patch
new file mode 100644
index 0000000000..d096ee9402
--- /dev/null
+++ b/packages/python/python-2.5.2/06-fix-urllib-exception.patch
@@ -0,0 +1,13 @@
+Index: python/Lib/urllib.py
+===================================================================
+--- python.orig/Lib/urllib.py 2007-03-06 17:16:49.000000000 -0300
++++ python/Lib/urllib.py 2007-03-06 17:17:05.000000000 -0300
+@@ -358,7 +358,7 @@
+ """Default error handler: close the connection and raise IOError."""
+ void = fp.read()
+ fp.close()
+- raise IOError, ('http error', errcode, errmsg, headers)
++ raise IOError, ('http error', errcode, errmsg)
+
+ if hasattr(socket, "ssl"):
+ def open_https(self, url, data=None):
diff --git a/packages/python/python-2.5.2/13-set-wakeup-fix.patch b/packages/python/python-2.5.2/13-set-wakeup-fix.patch
new file mode 100644
index 0000000000..807014b7a7
--- /dev/null
+++ b/packages/python/python-2.5.2/13-set-wakeup-fix.patch
@@ -0,0 +1,87 @@
+Index: python-2.5.2/Modules/signalmodule.c
+===================================================================
+--- python-2.5.2.orig/Modules/signalmodule.c 2008-02-23 13:10:12.000000000 -0300
++++ python-2.5.2/Modules/signalmodule.c 2008-02-23 13:10:48.000000000 -0300
+@@ -12,6 +12,8 @@
+
+ #include <signal.h>
+
++#include <sys/stat.h>
++
+ #ifndef SIG_ERR
+ #define SIG_ERR ((PyOS_sighandler_t)(-1))
+ #endif
+@@ -75,6 +77,8 @@
+ PyObject *func;
+ } Handlers[NSIG];
+
++static sig_atomic_t wakeup_fd = -1;
++
+ /* Speed up sigcheck() when none tripped */
+ static volatile sig_atomic_t is_tripped = 0;
+
+@@ -113,6 +117,7 @@
+ 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) {
+@@ -128,6 +133,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);
+ #ifdef WITH_THREAD
+ }
+ #endif
+@@ -267,6 +274,39 @@
+ anything else -- the callable Python object used as a handler");
+
+
++static PyObject *
++signal_set_wakeup_fd(PyObject *self, PyObject *args)
++{
++ struct stat buf;
++ int fd, old_fd;
++ if (!PyArg_ParseTuple(args, "i:set_wakeup_fd", &fd))
++ return NULL;
++#ifdef WITH_THREAD
++ if (PyThread_get_thread_ident() != main_thread) {
++ PyErr_SetString(PyExc_ValueError,
++ "set_wakeup_fd only works in main thread");
++ return NULL;
++ }
++#endif
++ if (fd != -1 && fstat(fd, &buf) != 0) {
++ PyErr_SetString(PyExc_ValueError, "invalid fd");
++ return NULL;
++ }
++ old_fd = wakeup_fd;
++ wakeup_fd = fd;
++ return PyLong_FromLong(old_fd);
++}
++
++PyDoc_STRVAR(set_wakeup_fd_doc,
++"set_wakeup_fd(fd) -> fd\n\
++\n\
++Sets the fd to be written to (with '\\0') when a signal\n\
++comes in. A library can use this to wakeup select or poll.\n\
++The previous fd is returned.\n\
++\n\
++The fd must be non-blocking.");
++
++
+ /* List of functions defined in the module */
+ static PyMethodDef signal_methods[] = {
+ #ifdef HAVE_ALARM
+@@ -274,6 +314,7 @@
+ #endif
+ {"signal", signal_signal, METH_VARARGS, signal_doc},
+ {"getsignal", signal_getsignal, METH_VARARGS, getsignal_doc},
++ {"set_wakeup_fd", signal_set_wakeup_fd, METH_VARARGS, set_wakeup_fd_doc},
+ #ifdef HAVE_PAUSE
+ {"pause", (PyCFunction)signal_pause,
+ METH_NOARGS,pause_doc},
diff --git a/packages/python/python-2.5.2/14-encodings-oriental.patch b/packages/python/python-2.5.2/14-encodings-oriental.patch
new file mode 100644
index 0000000000..4c942f1b75
--- /dev/null
+++ b/packages/python/python-2.5.2/14-encodings-oriental.patch
@@ -0,0 +1,64 @@
+Index: python-2.5.2/debian/rules
+===================================================================
+--- python-2.5.2.orig/debian/rules 2008-02-26 14:15:36.000000000 -0300
++++ python-2.5.2/debian/rules 2008-02-26 14:17:42.000000000 -0300
+@@ -134,6 +134,8 @@
+ )
+ find $(d_dev)/$(scriptdir) -name "*.pyo" -type f | grep -v -f $(only_dev_list) | xargs rm -f
+
++ find $(d_dev)/$(scriptdir)/encodings | grep -f $(only_dev_list) | xargs -i mv '{}' $(d_dev)/$(scriptdir)/encodings_orient
++
+ # move the interpreter
+ mv $(d_dev)/usr/bin/python2.5 $(d_base)/usr/bin/python2.5
+
+Index: python-2.5.2/Lib/encodings/__init__.py
+===================================================================
+--- python-2.5.2.orig/Lib/encodings/__init__.py 2008-02-26 14:15:07.000000000 -0300
++++ python-2.5.2/Lib/encodings/__init__.py 2008-02-26 14:17:42.000000000 -0300
+@@ -99,6 +99,14 @@
+ pass
+ else:
+ break
++
++ try:
++ mod = __import__('encodings_orient.' + modname,
++ globals(), locals(), _import_tail)
++ except ImportError:
++ pass
++ else:
++ break
+ else:
+ mod = None
+
+Index: python-2.5.2/Makefile.pre.in
+===================================================================
+--- python-2.5.2.orig/Makefile.pre.in 2008-02-26 14:15:07.000000000 -0300
++++ python-2.5.2/Makefile.pre.in 2008-02-26 14:17:42.000000000 -0300
+@@ -717,7 +717,7 @@
+ PLATMACPATH=:plat-mac:plat-mac/lib-scriptpackages
+ LIBSUBDIRS= lib-tk site-packages test test/output test/data \
+ test/decimaltestdata \
+- encodings compiler hotshot \
++ encodings encodings_orient compiler hotshot \
+ email email/mime email/test email/test/data \
+ sqlite3 sqlite3/test \
+ logging bsddb bsddb/test csv wsgiref \
+Index: python-2.5.2/debian/onlysdk
+===================================================================
+--- python-2.5.2.orig/debian/onlysdk 2008-02-26 14:15:07.000000000 -0300
++++ python-2.5.2/debian/onlysdk 2008-02-26 14:17:42.000000000 -0300
+@@ -1,7 +1,6 @@
+ distutils
+ compile
+-encodings/cp
+-encodings/mac
++encodings_orient
+ doctest
+ unittest
+ hotshot
+Index: python-2.5.2/Lib/encodings_orient/__init__.py
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ python-2.5.2/Lib/encodings_orient/__init__.py 2008-02-26 14:17:42.000000000 -0300
+@@ -0,0 +1 @@
++#Dummy
diff --git a/packages/python/python-2.5.2/16-bug1179-imageop.patch b/packages/python/python-2.5.2/16-bug1179-imageop.patch
new file mode 100644
index 0000000000..895d4e0a17
--- /dev/null
+++ b/packages/python/python-2.5.2/16-bug1179-imageop.patch
@@ -0,0 +1,219 @@
+Index: python-2.5.2/Modules/imageop.c
+===================================================================
+--- python-2.5.2.orig/Modules/imageop.c 2006-01-19 03:09:39.000000000 -0300
++++ python-2.5.2/Modules/imageop.c 2008-04-07 16:29:09.000000000 -0300
+@@ -78,7 +78,7 @@
+ char *cp, *ncp;
+ short *nsp;
+ Py_Int32 *nlp;
+- int len, size, x, y, newx1, newx2, newy1, newy2;
++ int len, size, x, y, newx1, newx2, newy1, newy2, nlen;
+ int ix, iy, xstep, ystep;
+ PyObject *rv;
+
+@@ -90,13 +90,19 @@
+ PyErr_SetString(ImageopError, "Size should be 1, 2 or 4");
+ return 0;
+ }
+- if ( len != size*x*y ) {
++ if (( len != size*x*y ) ||
++ ( size != ((len / x) / y) )) {
+ PyErr_SetString(ImageopError, "String has incorrect length");
+ return 0;
+ }
+ xstep = (newx1 < newx2)? 1 : -1;
+ ystep = (newy1 < newy2)? 1 : -1;
+
++ nlen = (abs(newx2-newx1)+1)*(abs(newy2-newy1)+1)*size;
++ if ( size != ((nlen / (abs(newx2-newx1)+1)) / (abs(newy2-newy1)+1)) ) {
++ PyErr_SetString(ImageopError, "String has incorrect length");
++ return 0;
++ }
+ rv = PyString_FromStringAndSize(NULL,
+ (abs(newx2-newx1)+1)*(abs(newy2-newy1)+1)*size);
+ if ( rv == 0 )
+@@ -132,7 +138,7 @@
+ char *cp, *ncp;
+ short *nsp;
+ Py_Int32 *nlp;
+- int len, size, x, y, newx, newy;
++ int len, size, x, y, newx, newy, nlen;
+ int ix, iy;
+ int oix, oiy;
+ PyObject *rv;
+@@ -145,12 +151,18 @@
+ PyErr_SetString(ImageopError, "Size should be 1, 2 or 4");
+ return 0;
+ }
+- if ( len != size*x*y ) {
++ if ( ( len != size*x*y ) ||
++ ( size != ((len / x) / y) ) ) {
++ PyErr_SetString(ImageopError, "String has incorrect length");
++ return 0;
++ }
++ nlen = newx*newy*size;
++ if ( size != ((nlen / newx) / newy) ) {
+ PyErr_SetString(ImageopError, "String has incorrect length");
+ return 0;
+ }
+
+- rv = PyString_FromStringAndSize(NULL, newx*newy*size);
++ rv = PyString_FromStringAndSize(NULL, nlen);
+ if ( rv == 0 )
+ return 0;
+ ncp = (char *)PyString_AsString(rv);
+@@ -190,7 +202,8 @@
+ PyErr_SetString(ImageopError, "Size should be 1 or 4");
+ return 0;
+ }
+- if ( maxx*maxy*width != len ) {
++ if ( ( maxx*maxy*width != len ) ||
++ ( maxx != ((len / maxy) / width) ) ) {
+ PyErr_SetString(ImageopError, "String has incorrect length");
+ return 0;
+ }
+@@ -240,7 +253,8 @@
+ if ( !PyArg_ParseTuple(args, "s#iii", &cp, &len, &x, &y, &tres) )
+ return 0;
+
+- if ( x*y != len ) {
++ if ( ( x*y != len ) ||
++ ( x != len / y ) ) {
+ PyErr_SetString(ImageopError, "String has incorrect length");
+ return 0;
+ }
+@@ -281,7 +295,8 @@
+ if ( !PyArg_ParseTuple(args, "s#ii", &cp, &len, &x, &y) )
+ return 0;
+
+- if ( x*y != len ) {
++ if ( ( x*y != len ) ||
++ ( x != len / y ) ) {
+ PyErr_SetString(ImageopError, "String has incorrect length");
+ return 0;
+ }
+@@ -320,7 +335,8 @@
+ if ( !PyArg_ParseTuple(args, "s#ii", &cp, &len, &x, &y) )
+ return 0;
+
+- if ( x*y != len ) {
++ if ( ( x*y != len ) ||
++ ( x != len / y ) ) {
+ PyErr_SetString(ImageopError, "String has incorrect length");
+ return 0;
+ }
+@@ -358,7 +374,8 @@
+ if ( !PyArg_ParseTuple(args, "s#ii", &cp, &len, &x, &y) )
+ return 0;
+
+- if ( x*y != len ) {
++ if ( ( x*y != len ) ||
++ ( x != len / y ) ) {
+ PyErr_SetString(ImageopError, "String has incorrect length");
+ return 0;
+ }
+@@ -404,7 +421,8 @@
+ if ( !PyArg_ParseTuple(args, "s#ii", &cp, &len, &x, &y) )
+ return 0;
+
+- if ( x*y != len ) {
++ if ( ( x*y != len ) ||
++ ( x != len / y ) ) {
+ PyErr_SetString(ImageopError, "String has incorrect length");
+ return 0;
+ }
+@@ -443,7 +461,11 @@
+ if ( !PyArg_ParseTuple(args, "s#iiii", &cp, &len, &x, &y, &v0, &v1) )
+ return 0;
+
+- nlen = x*y;
++ nlen = x*y;
++ if ( x != (nlen / y) ) {
++ PyErr_SetString(ImageopError, "String has incorrect length");
++ return 0;
++ }
+ if ( (nlen+7)/8 != len ) {
+ PyErr_SetString(ImageopError, "String has incorrect length");
+ return 0;
+@@ -481,6 +503,10 @@
+ return 0;
+
+ nlen = x*y;
++ if ( x != (nlen / y) ) {
++ PyErr_SetString(ImageopError, "String has incorrect length");
++ return 0;
++ }
+ if ( (nlen+3)/4 != len ) {
+ PyErr_SetString(ImageopError, "String has incorrect length");
+ return 0;
+@@ -517,6 +543,10 @@
+ return 0;
+
+ nlen = x*y;
++ if ( x != (nlen / y) ) {
++ PyErr_SetString(ImageopError, "String has incorrect length");
++ return 0;
++ }
+ if ( (nlen+1)/2 != len ) {
+ PyErr_SetString(ImageopError, "String has incorrect length");
+ return 0;
+@@ -554,6 +584,10 @@
+ return 0;
+
+ nlen = x*y;
++ if ( x != (nlen / y) ) {
++ PyErr_SetString(ImageopError, "String has incorrect length");
++ return 0;
++ }
+ if ( nlen*4 != len ) {
+ PyErr_SetString(ImageopError, "String has incorrect length");
+ return 0;
+@@ -598,6 +632,10 @@
+ return 0;
+
+ nlen = x*y;
++ if ( x != (nlen / y) ) {
++ PyErr_SetString(ImageopError, "String has incorrect length");
++ return 0;
++ }
+ if ( nlen != len ) {
+ PyErr_SetString(ImageopError, "String has incorrect length");
+ return 0;
+@@ -648,6 +686,10 @@
+ return 0;
+
+ nlen = x*y;
++ if ( x != (nlen / y) ) {
++ PyErr_SetString(ImageopError, "String has incorrect length");
++ return 0;
++ }
+ if ( nlen*4 != len ) {
+ PyErr_SetString(ImageopError, "String has incorrect length");
+ return 0;
+@@ -693,6 +735,10 @@
+ return 0;
+
+ nlen = x*y;
++ if ( x != (nlen / y) ) {
++ PyErr_SetString(ImageopError, "String has incorrect length");
++ return 0;
++ }
+ if ( nlen != len ) {
+ PyErr_SetString(ImageopError, "String has incorrect length");
+ return 0;
+Index: python-2.5.2/Modules/rgbimgmodule.c
+===================================================================
+--- python-2.5.2.orig/Modules/rgbimgmodule.c 2008-02-14 08:26:18.000000000 -0300
++++ python-2.5.2/Modules/rgbimgmodule.c 2008-04-07 16:29:10.000000000 -0300
+@@ -299,6 +299,11 @@
+ xsize = image.xsize;
+ ysize = image.ysize;
+ zsize = image.zsize;
++ tablen = xsize * ysize * zsize * sizeof(Py_Int32);
++ if (xsize != (((tablen / ysize) / zsize) / sizeof(Py_Int32))) {
++ PyErr_NoMemory();
++ goto finally;
++ }
+ if (rle) {
+ tablen = ysize * zsize * sizeof(Py_Int32);
+ rlebuflen = (int) (1.05 * xsize +10);
diff --git a/packages/python/python_2.5.2.bb b/packages/python/python_2.5.2.bb
index d968483d17..d6e8bb3ab0 100644
--- a/packages/python/python_2.5.2.bb
+++ b/packages/python/python_2.5.2.bb
@@ -6,19 +6,27 @@ PRIORITY = "optional"
DEPENDS = "python-native db gdbm openssl readline sqlite3 tcl tk zlib"
DEPENDS_sharprom = "python-native db readline zlib gdbm openssl"
# bump this on every change in contrib/python/generate-manifest-2.5.py
-FILE_PR = "ml11"
+FILE_PR = "ml13"
PYTHON_MAJMIN = "2.5"
-SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.bz2 \
- file://bindir-libdir.patch;patch=1 \
- file://crosscompile.patch;patch=1 \
- file://fix-tkinter-detection.patch;patch=1 \
- file://autohell.patch;patch=1 \
- file://sitebranding.patch;patch=1 \
- file://enable-ctypes-module.patch;patch=1 \
- file://default-is-optimized.patch;patch=1 \
- file://sitecustomize.py"
+SRC_URI = "\
+ http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.bz2 \
+ file://bindir-libdir.patch;patch=1 \
+ file://crosscompile.patch;patch=1 \
+ file://fix-tkinter-detection.patch;patch=1 \
+ file://autohell.patch;patch=1 \
+ file://sitebranding.patch;patch=1 \
+ file://enable-ctypes-module.patch;patch=1 \
+ file://default-is-optimized.patch;patch=1 \
+ \
+ file://05-install.patch;patch=1 \
+ file://06-fix-urllib-exception.patch;patch=1 \
+ file://16-bug1179-imageop.patch;patch=1 \
+ file://13-set-wakeup-fix.patch;patch=1 \
+ \
+ file://sitecustomize.py \
+"
S = "${WORKDIR}/Python-${PV}"
inherit autotools