[Pkg-tcltk-commits] r1075 - in expect/trunk/debian: . patches
sgolovan at alioth.debian.org
sgolovan at alioth.debian.org
Sun Sep 5 05:55:21 UTC 2010
Author: sgolovan
Date: 2010-09-05 05:55:20 +0000 (Sun, 05 Sep 2010)
New Revision: 1075
Added:
expect/trunk/debian/patches/20-two-asterisks.patch
Modified:
expect/trunk/debian/changelog
expect/trunk/debian/control
expect/trunk/debian/patches/06-pkgindex.patch
expect/trunk/debian/patches/series
Log:
[expect]
* Added patch by upstream (proposed by Per Cederqvist) which fixes
slow processing of certain regexp patterns by preventing their
convertation to glob patterns (closes: #591695).
* Don't load Expect package to tclsh 8.4 because it causes a
segmentation fault.
* Updated package to standards version 3.9.1 (no changes needed).
Modified: expect/trunk/debian/changelog
===================================================================
--- expect/trunk/debian/changelog 2010-09-04 23:36:19 UTC (rev 1074)
+++ expect/trunk/debian/changelog 2010-09-05 05:55:20 UTC (rev 1075)
@@ -1,8 +1,13 @@
-expect (5.44.1.15-3) UNRELEASED; urgency=low
+expect (5.44.1.15-3) unstable; urgency=low
- * NOT RELEASED YET
+ * Added patch by upstream (proposed by Per Cederqvist) which fixes
+ slow processing of certain regexp patterns by preventing their
+ convertation to glob patterns (closes: #591695).
+ * Don't load Expect package to tclsh 8.4 because it causes a
+ segmentation fault.
+ * Updated package to standards version 3.9.1 (no changes needed).
- -- Sergei Golovan <sgolovan at debian.org> Thu, 15 Jul 2010 18:48:08 +0400
+ -- Sergei Golovan <sgolovan at debian.org> Sun, 05 Sep 2010 09:48:27 +0400
expect (5.44.1.15-2) unstable; urgency=low
Modified: expect/trunk/debian/control
===================================================================
--- expect/trunk/debian/control 2010-09-04 23:36:19 UTC (rev 1074)
+++ expect/trunk/debian/control 2010-09-05 05:55:20 UTC (rev 1075)
@@ -5,7 +5,7 @@
Build-Depends: debhelper (>= 7.0.50~), quilt (>=0.46-7), autotools-dev, autoconf,
tcl8.5-dev, tk8.5-dev (>= 8.5.7-2)
Build-Conflicts: autoconf2.13
-Standards-Version: 3.9.0
+Standards-Version: 3.9.1
Homepage: http://sourceforge.net/projects/expect/
Package: expect
Modified: expect/trunk/debian/patches/06-pkgindex.patch
===================================================================
--- expect/trunk/debian/patches/06-pkgindex.patch 2010-09-04 23:36:19 UTC (rev 1074)
+++ expect/trunk/debian/patches/06-pkgindex.patch 2010-09-05 05:55:20 UTC (rev 1075)
@@ -8,21 +8,27 @@
--- expect-5.44.1.15.orig/Makefile.in
+++ expect-5.44.1.15/Makefile.in
-@@ -331,7 +331,7 @@
+@@ -330,8 +330,10 @@
+ ( echo pkg_mkIndex . $(PKG_LIB_FILE) \; exit; ) | $(TCLSH)
pkgIndex.tcl-hand:
- (echo 'package ifneeded Expect $(PACKAGE_VERSION) \
+- (echo 'package ifneeded Expect $(PACKAGE_VERSION) \
- [list load [file join $$dir $(PKG_LIB_FILE)]]'\
++ (echo 'if {[package vcompare [info tclversion] @TCL_VERSION@] < 0} return' ; \
++ echo '' ; \
++ echo 'package ifneeded Expect $(PACKAGE_VERSION) \
+ [list load [file join @prefix@ lib libexpect.so. at PACKAGE_VERSION@]]'\
) > pkgIndex.tcl
#========================================================================
--- expect-5.44.1.15.orig/pkgIndex.in
+++ expect-5.44.1.15/pkgIndex.in
-@@ -7,4 +7,4 @@
+@@ -7,4 +7,6 @@
# script is sourced, the variable $dir must contain the
# full path name of this file's directory.
++if {[package vcompare [info tclversion] @TCL_VERSION@] < 0} return
++
-package ifneeded Expect @EXP_VERSION_FULL@ [list load [file join $dir .. @EXP_SHARED_LIB_FILE@]]
+package ifneeded Expect @EXP_VERSION_FULL@ [list load [file join @prefix@ lib libexpect.so. at PACKAGE_VERSION@]]
--- expect-5.44.1.15.orig/tests/cat.test
Added: expect/trunk/debian/patches/20-two-asterisks.patch
===================================================================
--- expect/trunk/debian/patches/20-two-asterisks.patch (rev 0)
+++ expect/trunk/debian/patches/20-two-asterisks.patch 2010-09-05 05:55:20 UTC (rev 1075)
@@ -0,0 +1,70 @@
+Author: Upstream (proposed by Per Cederqvist <ceder at lysator.liu.se>)
+Description: The patch fixes regression with very slow regexp pattern
+ processing which were converted into too complex glob patterns.
+ The regression was added in version 5.44.
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=591695
+Bug-Upstream: http://sourceforge.net/tracker/?func=detail&atid=113179&aid=3010684&group_id=13179
+Forwarded: no
+Last-updated: Sun, 05 Sep 2010 09:35:03 +0400
+
+--- expect-5.44.1.15.orig/retoglob.c
++++ expect-5.44.1.15/retoglob.c
+@@ -34,6 +34,10 @@
+ Tcl_UniChar* str,
+ int strlen));
+
++static int
++ExpCountStar _ANSI_ARGS_ ((Tcl_UniChar* src, Tcl_UniChar* last));
++
++
+ static char*
+ xxx (Tcl_UniChar* x, int xl)
+ {
+@@ -465,6 +469,15 @@
+ LOG (stderr,"ST '%s'\n",xxx(out,nexto-out)); FF;
+
+ /*
++ * Heuristic: if there are more than two *s, the risk is far too
++ * large that the result actually is slower than the normal re
++ * matching. So bail out.
++ */
++ if (ExpCountStar (out,nexto) > 2) {
++ goto error;
++ }
++
++ /*
+ * Check if the result is actually useful.
+ * Empty or just a *, or ? are not. A series
+ * of ?'s is borderline, as they semi-count
+@@ -717,6 +730,31 @@
+ return dst;
+ }
+
++static int
++ExpCountStar (src, last)
++ Tcl_UniChar* src;
++ Tcl_UniChar* last;
++{
++ int skip = 0;
++ int stars = 0;
++
++ /* Count number of *'s. State machine. The complexity is due to the
++ * need of handling escaped characters.
++ */
++
++ for (; src < last; src++) {
++ if (skip) {
++ skip = 0;
++ } else if (*src == '\\') {
++ skip = 1;
++ } else if (*src == '*') {
++ stars++;
++ }
++ }
++
++ return stars;
++}
++
+ #undef CHOP
+ #undef CHOPC
+ #undef EMIT
Modified: expect/trunk/debian/patches/series
===================================================================
--- expect/trunk/debian/patches/series 2010-09-04 23:36:19 UTC (rev 1074)
+++ expect/trunk/debian/patches/series 2010-09-05 05:55:20 UTC (rev 1075)
@@ -14,3 +14,4 @@
17-norc.patch
18-non-linux.patch
19-tk-init.patch
+20-two-asterisks.patch
More information about the Pkg-tcltk-commits
mailing list