diff -u python2.6-2.6.4/debian/changelog python2.6-2.6.4/debian/changelog --- python2.6-2.6.4/debian/changelog +++ python2.6-2.6.4/debian/changelog @@ -1,3 +1,10 @@ +python2.6 (2.6.4-0ubuntu4) karmic-proposed; urgency=low + + * debian/patches/readline-trailing-spatch.dpatch: + - Don't add trailing space when completing. (LP: #470824) + + -- Adam Collard Sun, 21 Feb 2010 21:43:24 +0000 + python2.6 (2.6.4-0ubuntu3) karmic-proposed; urgency=low * debian/patches/locales-without-encoding.dpatch: diff -u python2.6-2.6.4/debian/rules python2.6-2.6.4/debian/rules --- python2.6-2.6.4/debian/rules +++ python2.6-2.6.4/debian/rules @@ -959,6 +959,7 @@ # which patches should be applied? debian_patches = \ + readline-trailing-space \ deb-setup \ deb-locations \ site-locations \ diff -u python2.6-2.6.4/debian/patches/series python2.6-2.6.4/debian/patches/series --- python2.6-2.6.4/debian/patches/series +++ python2.6-2.6.4/debian/patches/series @@ -1,3 +1,4 @@ +readline-trailing-space deb-setup deb-locations locale-module only in patch2: unchanged: --- python2.6-2.6.4.orig/debian/patches/readline-trailing-space.dpatch +++ python2.6-2.6.4/debian/patches/readline-trailing-space.dpatch @@ -0,0 +1,46 @@ +dir= +if [ $# -eq 3 -a "$2" = '-d' ]; then + pdir="-d $3" + dir="$3/" +elif [ $# -ne 1 ]; then + echo >&2 "usage: `basename $0`: -patch|-unpatch [-d ]" + exit 1 +fi +case "$1" in + -patch) + patch $pdir -f --no-backup-if-mismatch -p0 < $0 + ;; + -unpatch) + patch $pdir -f --no-backup-if-mismatch -R -p0 < $0 + ;; + *) + echo >&2 "usage: `basename $0`: -patch|-unpatch [-d ]" + exit 1 +esac +exit 0 + +--- Modules/readline.c 2010-02-21 21:28:21.000000000 +0000 ++++ Modules/readline.c 2010-02-21 21:28:40.000000000 +0000 +@@ -759,6 +759,12 @@ + static char ** + flex_complete(char *text, int start, int end) + { ++#ifdef HAVE_RL_COMPLETION_APPEND_CHARACTER ++ rl_completion_append_character ='\0'; ++#endif ++#ifdef HAVE_RL_COMPLETION_SUPPRESS_APPEND ++ rl_completion_suppress_append = 0; ++#endif + Py_XDECREF(begidx); + Py_XDECREF(endidx); + begidx = PyInt_FromLong((long) start); +@@ -801,9 +807,6 @@ + rl_completer_word_break_characters = + strdup(" \t\n`~!@#$%^&*()-=+[{]}\\|;:'\",<>/?"); + /* All nonalphanums except '.' */ +-#ifdef HAVE_RL_COMPLETION_APPEND_CHARACTER +- rl_completion_append_character ='\0'; +-#endif + + begidx = PyInt_FromLong(0L); + endidx = PyInt_FromLong(0L);