tag 518289 + patch kthxbye Hi,
I guess this has already been fixed upstream, but for the impatient: gen_shell_function_matches() is trying to restore a parser state that has never been saved. My fix is simple and pragmatic as I don't have any in-depth knowledge regarding whether it's necessary to save the parser state in that place at all... but bash4 works with it, so here goes. Regards, Jan
diff -u bash-4.0/debian/rules bash-4.0/debian/rules
--- bash-4.0/debian/rules
+++ bash-4.0/debian/rules
@@ -555,6 +555,7 @@
input-err \
exec-redirections-man \
bash-aliases-repeat \
+ tentative-4.0parserstate
ifeq ($(with_gfdl),yes)
debian_patches += \
only in patch2:
unchanged:
--- bash-4.0.orig/debian/patches/tentative-4.0parserstate.dpatch
+++ bash-4.0/debian/patches/tentative-4.0parserstate.dpatch
@@ -0,0 +1,29 @@
+#! /bin/sh -e
+
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch) patch $pdir -f --no-backup-if-mismatch -p1 < $0;;
+ -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p1 < $0;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+# DP: Save the parser state so it can later be restored. Heh.
+
+--- bash-4.0/pcomplete.c 2009-02-01 23:12:31.000000000 +0100
++++ bash-4.0/pcomplete.cM 2009-03-09 23:04:33.295242137 +0100
+@@ -1032,6 +1032,7 @@
+ cmdlist = build_arg_list (funcname, text, lwords, cw);
+
+ pps = &ps;
++ save_parser_state(pps);
+ begin_unwind_frame ("gen-shell-function-matches");
+ add_unwind_protect (restore_parser_state, (char *)pps);
+ add_unwind_protect (dispose_words, (char *)cmdlist);
signature.asc
Description: Digital signature

