From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7495 invoked by alias); 6 Mar 2004 23:42:52 -0000 Mailing-List: contact insight-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: insight-owner@sources.redhat.com Received: (qmail 7481 invoked from network); 6 Mar 2004 23:42:51 -0000 Received: from unknown (HELO NUTMEG.CAM.ARTIMI.COM) (217.40.111.177) by sources.redhat.com with SMTP; 6 Mar 2004 23:42:51 -0000 Received: from mace ([192.168.1.25]) by NUTMEG.CAM.ARTIMI.COM with Microsoft SMTPSVC(6.0.3790.0); Sat, 6 Mar 2004 23:42:17 +0000 From: "Dave Korn" To: Cc: Subject: [PATCH] Fix self-destructing Insight installation! Date: Sat, 06 Mar 2004 23:42:00 -0000 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0000_01C403D4.A9228B60" In-Reply-To: Message-ID: X-OriginalArrivalTime: 06 Mar 2004 23:42:17.0890 (UTC) FILETIME=[A9246020:01C403D4] X-SW-Source: 2004-q1/txt/msg00071.txt.bz2 This is a multi-part message in MIME format. ------=_NextPart_000_0000_01C403D4.A9228B60 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-length: 1741 > -----Original Message----- > From: Dave Korn > Sent: 05 March 2004 18:41 > To: 'insight' > And all of a sudden, I got this error message, and insight > refused to run. > > I've only managed to capture it in .PNG format, because it > was one of those windows that you can't copy+paste code from, > but basically what it said was "Can't find a usable > main.tcl", then an error report ("extra characters after > close-brace") and stack backtrace, followed by the > threatening message "This probably means that insight wasn't > installed properly". Ok, I've solved it. It was happening because the name of the function I set a breakpoint on had the word 'option' in it. The line in the prefs file was perfectly valid, but in read_prefs it was being matched by an insufficiently-tight regexp in the main parse-a-line loop of the function. This regexp was looking for lines beginning with the word 'option', but the anchor character was omitted. The enclosed diff fixes the bug and restores my insight installation to perfect working order. (Since the diff is so tiny, I've attached it as well, in case outlook wraps or mangles it). 2004-03-06 Dave Korn * prefs.tcl (read_prefs): anchor regexp for option command lines at start-of-line. diff -rNpu insight1.0.orig/prefs.tcl insight1.0/prefs.tcl --- insight1.0.orig/prefs.tcl 2003-09-20 03:45:17.001000000 +0100 +++ insight1.0/prefs.tcl 2004-03-06 23:23:22.634961900 +0000 @@ -92,7 +92,7 @@ proc pref_read {} { regexp {\[(.*)\]} $line match section } - {[ \t\n]*option.*} { + {^[ \t\n]*option.*} { set line [string trimleft $line] eval $line } cheers, DaveK -- Can't think of a witty .sigline today.... ------=_NextPart_000_0000_01C403D4.A9228B60 Content-Type: text/plain; name="insight-patch.txt" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="insight-patch.txt" Content-length: 390 diff -rNpu insight1.0.orig/prefs.tcl insight1.0/prefs.tcl --- insight1.0.orig/prefs.tcl 2003-09-20 03:45:17.001000000 +0100 +++ insight1.0/prefs.tcl 2004-03-06 23:23:22.634961900 +0000 @@ -92,7 +92,7 @@ proc pref_read {} { regexp {\[(.*)\]} $line match section } =20 - {[ \t\n]*option.*} { + {^[ \t\n]*option.*} { set line [string trimleft $line] eval $line } ------=_NextPart_000_0000_01C403D4.A9228B60--