I've uploaded an NMU to DELAYED/10. The patch uses quilt, as that's what your other packages seem to prefer.
Christoph -- [email protected] | http://www.df7cb.de/
debdiff python-pmw_1.3.2-3.dsc python-pmw_1.3.2-3.1.dsc python-pmw-1.3.2/debian/changelog | 8 +++ python-pmw-1.3.2/debian/control | 2 python-pmw-1.3.2/debian/rules | 6 +- debian/README.source | 58 ++++++++++++++++++++++++++ debian/patches/series | 1 debian/patches/PmwOptionMenu.py-deletecommand | 54 ++++++++++++++++++++++++ 6 files changed, 126 insertions(+), 3 deletions(-) diff -u python-pmw-1.3.2/debian/changelog python-pmw-1.3.2/debian/changelog --- python-pmw-1.3.2/debian/changelog +++ python-pmw-1.3.2/debian/changelog @@ -1,3 +1,11 @@ +python-pmw (1.3.2-3.1) unstable; urgency=low + + * Non-maintainer upload. + * Do not try to delete commands in python versions >= 2.5.4. + (Closes: #561145) + + -- Christoph Berg <[email protected]> Mon, 14 Dec 2009 20:53:04 +0100 + python-pmw (1.3.2-3) unstable; urgency=low * Don't fail build if usr/lib is already removed (Closes: #472023) diff -u python-pmw-1.3.2/debian/control python-pmw-1.3.2/debian/control --- python-pmw-1.3.2/debian/control +++ python-pmw-1.3.2/debian/control @@ -2,7 +2,7 @@ Section: python Priority: optional Maintainer: Carlo Segre <[email protected]> -Build-Depends: debhelper (>= 5.0.37.1) +Build-Depends: debhelper (>= 5.0.37.1), quilt Build-Depends-Indep: python (>= 2.3.5-10), python-central (>= 0.5) XS-Python-Version: all Standards-Version: 3.7.3 diff -u python-pmw-1.3.2/debian/rules python-pmw-1.3.2/debian/rules --- python-pmw-1.3.2/debian/rules +++ python-pmw-1.3.2/debian/rules @@ -2,6 +2,8 @@ # Made with the aid of debmake, by Christoph Lameter, # based on the sample debian/rules file for GNU hello by Ian Jackson. +include /usr/share/quilt/quilt.make + packagedoc=python-pmw-doc source_dir=$(CURDIR)/src/Pmw package_dir=./debian/python-pmw @@ -9,11 +11,11 @@ v=Pmw_1_3 PYTHON=`readlink /usr/bin/python` -build: +build: patch dh_testdir touch build -clean: +clean: unpatch dh_testdir -rm -f build dh_clean -i only in patch2: unchanged: --- python-pmw-1.3.2.orig/debian/README.source +++ python-pmw-1.3.2/debian/README.source @@ -0,0 +1,58 @@ +This package uses quilt to manage all modifications to the upstream +source. Changes are stored in the source package as diffs in +debian/patches and applied during the build. + +To configure quilt to use debian/patches instead of patches, you want +either to export QUILT_PATCHES=debian/patches in your environment +or use this snippet in your ~/.quiltrc: + + for where in ./ ../ ../../ ../../../ ../../../../ ../../../../../; do + if [ -e ${where}debian/rules -a -d ${where}debian/patches ]; then + export QUILT_PATCHES=debian/patches + break + fi + done + +To get the fully patched source after unpacking the source package, cd to +the root level of the source package and run: + + quilt push -a + +The last patch listed in debian/patches/series will become the current +patch. + +To add a new set of changes, first run quilt push -a, and then run: + + quilt new <patch> + +where <patch> is a descriptive name for the patch, used as the filename in +debian/patches. Then, for every file that will be modified by this patch, +run: + + quilt add <file> + +before editing those files. You must tell quilt with quilt add what files +will be part of the patch before making changes or quilt will not work +properly. After editing the files, run: + + quilt refresh + +to save the results as a patch. + +Alternately, if you already have an external patch and you just want to +add it to the build system, run quilt push -a and then: + + quilt import -P <patch> /path/to/patch + quilt push -a + +(add -p 0 to quilt import if needed). <patch> as above is the filename to +use in debian/patches. The last quilt push -a will apply the patch to +make sure it works properly. + +To remove an existing patch from the list of patches that will be applied, +run: + + quilt delete <patch> + +You may need to run quilt pop -a to unapply patches first before running +this command. only in patch2: unchanged: --- python-pmw-1.3.2.orig/debian/patches/series +++ python-pmw-1.3.2/debian/patches/series @@ -0,0 +1 @@ +PmwOptionMenu.py-deletecommand only in patch2: unchanged: --- python-pmw-1.3.2.orig/debian/patches/PmwOptionMenu.py-deletecommand +++ python-pmw-1.3.2/debian/patches/PmwOptionMenu.py-deletecommand @@ -0,0 +1,54 @@ +Source: http://github.com/nanotube/pmw_fixes/commit/5e6dcbdaef2bb6c40037b922dd0efa081f1575ab (Daniel Folkinshteyn) + +fix bug in OptionMenu.setitems, introduced with the fixing of this python +bug: +http://bugs.python.org/issue1342811 + +versions of python 2.5.4 and newer now automatically delete commands when +items are deleted +however, that causes error if the command is deleted manually beforehand. +old versions, on the contrary, require manual command deletion to free up +the objects. + +so we put in a python version check to see if we need to manually delete +commands. + +fixes the Pmw bug referred to here: +http://sourceforge.net/forum/forum.php?thread_id=3283195&forum_id=33675 +and here: +http://sourceforge.net/tracker/?func=detail&aid=2795731&group_id=10743&ati +d=110743 + +--- a/src/Pmw/Pmw_1_3/lib/PmwOptionMenu.py ++++ b/src/Pmw/Pmw_1_3/lib/PmwOptionMenu.py +@@ -1,6 +1,7 @@ + import types + import Tkinter + import Pmw ++import sys + + class OptionMenu(Pmw.MegaWidget): + +@@ -59,11 +60,17 @@ class OptionMenu(Pmw.MegaWidget): + + def setitems(self, items, index = None): + +- # Clean up old items and callback commands. +- for oldIndex in range(len(self._itemList)): +- tclCommandName = str(self._menu.entrycget(oldIndex, 'command')) +- if tclCommandName != '': +- self._menu.deletecommand(tclCommandName) ++ # python version check ++ # python versions >= 2.5.4 automatically clean commands ++ # and manually cleaning them causes errors when deleting items ++ ++ if sys.version_info[0] * 100 + sys.version_info[1] * 10 + \ ++ sys.version_info[2] < 254: ++ # Clean up old items and callback commands. ++ for oldIndex in range(len(self._itemList)): ++ tclCommandName = str(self._menu.entrycget(oldIndex, 'command')) ++ if tclCommandName != '': ++ self._menu.deletecommand(tclCommandName) + self._menu.delete(0, 'end') + self._itemList = list(items) +
signature.asc
Description: Digital signature

