From 9884b12102db8104291b15e4ba235e713d9f5e25 Mon Sep 17 00:00:00 2001 From: Tomi Ollila Date: Sat, 2 Jun 2012 14:02:57 +0300 Subject: [PATCH] Re: bug in configure script --- 11/3eb7e488cc6f0b5bd07b40ef0a74094b385547 | 132 ++++++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 11/3eb7e488cc6f0b5bd07b40ef0a74094b385547 diff --git a/11/3eb7e488cc6f0b5bd07b40ef0a74094b385547 b/11/3eb7e488cc6f0b5bd07b40ef0a74094b385547 new file mode 100644 index 000000000..9babceb1e --- /dev/null +++ b/11/3eb7e488cc6f0b5bd07b40ef0a74094b385547 @@ -0,0 +1,132 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 3988A431FB6 + for ; Sat, 2 Jun 2012 04:02:54 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id 7-Fe5cdPYt8B for ; + Sat, 2 Jun 2012 04:02:53 -0700 (PDT) +Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) + by olra.theworths.org (Postfix) with ESMTP id 78743431FAF + for ; Sat, 2 Jun 2012 04:02:53 -0700 (PDT) +Received: by guru.guru-group.fi (Postfix, from userid 501) + id 5AA8E10064E; Sat, 2 Jun 2012 14:02:57 +0300 (EEST) +From: Tomi Ollila +To: Jameson Graef Rollins , + Notmuch Mail +Subject: Re: bug in configure script +In-Reply-To: <87pq9ivqvy.fsf@servo.finestructure.net> +References: <87pq9ivqvy.fsf@servo.finestructure.net> +User-Agent: Notmuch/0.13+29~g3c353b7 (http://notmuchmail.org) Emacs/23.1.1 + (x86_64-redhat-linux-gnu) +X-Face: HhBM'cA~ +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Sat, 02 Jun 2012 11:02:54 -0000 + +On Fri, Jun 01 2012, Jameson Graef Rollins wrote: + +> There's a bug in the configure script that is causing auto-reruns of +> ./configure to not inherit original command line options if there was +> more than one. For instance, if I run: +> +> ./configure --with-gmime-version=2.4 --prefix=/home/jrollins/opt/notmuch +> +> Then in Makefile.config I get: +> +> configure_options = --with-gmime-version=2.4--prefix=/home/jrollins/opt/notmuch +> +> This means that auto-reruns of configure will not get the proper +> options. +> +> I tracked this down to an issue with IFS and /bin/sh. The first line of +> ./configure is: +> +> readonly DEFAULT_IFS=$IFS +> +> DEFAULT_IFS is then used to reset IFS after it is modified within the +> script. The problem is that /bin/sh is setting DEFAULT_IFS to be NULL +> (i.e. ''), which leads to no separation between variables when "$@" is +> expanded (which is itself problematic since I don't think "@" should use +> the IFS when expanded). So this might be a bug in dash. I don't know. +> In any event we need to fix this somehow. + +dash manual states that readonly name=value should work, but it seems +to have some side effects. + +I tried some alternatives on command line: + +$ readonly FOO1=$IFS +$ echo "$FOO1" | od -f x1 +0000000 0a +0000001 + +$ readonly FOO2="$IFS" +$ echo "$FOO2" | od -f x1 +0000000 20 09 0a 0a +0000004 + +$ FOO3=$IFS +$ readonly FOO3 +$ echo "$FOO4" | od -f x1 +0000000 20 09 0a 0a +0000004 + +I.e. in dash 'readonly name=$value' $value gets expanded like it was given +in command line and not when just doing variable assignment. + +Easiest is just to drop the 'readonly'; too bad it caused problems :( +(I have to go now -- but I'll make a patch later unless someone beats +me by doing it sooner ;) + +Tomi + + +> I see two obvious solutions: +> +> * use /bin/bash. This a one line diff that fixes the problem +> immediately. +> +> * replace: +> +> IFS=$DEFAULT_IFS +> +> with: +> +> unset IFS +> +> Unsetting IFS also resets IFS to the default, without going through +> this intermediate step. +> +> I'm ok with either solution, but I'll wait for some feedback since I +> imagine someone will have an opinion. +> +> jamie. +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch -- 2.26.2