Re: notmuch-search-toggle-order and notmuch-tree
[notmuch-archives.git] / 11 / 3eb7e488cc6f0b5bd07b40ef0a74094b385547
1 Return-Path: <tomi.ollila@iki.fi>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 3988A431FB6\r
6         for <notmuch@notmuchmail.org>; Sat,  2 Jun 2012 04:02:54 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id 7-Fe5cdPYt8B for <notmuch@notmuchmail.org>;\r
16         Sat,  2 Jun 2012 04:02:53 -0700 (PDT)\r
17 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
18         by olra.theworths.org (Postfix) with ESMTP id 78743431FAF\r
19         for <notmuch@notmuchmail.org>; Sat,  2 Jun 2012 04:02:53 -0700 (PDT)\r
20 Received: by guru.guru-group.fi (Postfix, from userid 501)\r
21         id 5AA8E10064E; Sat,  2 Jun 2012 14:02:57 +0300 (EEST)\r
22 From: Tomi Ollila <tomi.ollila@iki.fi>\r
23 To: Jameson Graef Rollins <jrollins@finestructure.net>,\r
24         Notmuch Mail <notmuch@notmuchmail.org>\r
25 Subject: Re: bug in configure script\r
26 In-Reply-To: <87pq9ivqvy.fsf@servo.finestructure.net>\r
27 References: <87pq9ivqvy.fsf@servo.finestructure.net>\r
28 User-Agent: Notmuch/0.13+29~g3c353b7 (http://notmuchmail.org) Emacs/23.1.1\r
29         (x86_64-redhat-linux-gnu)\r
30 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
31         $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
32         !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
33 Date: Sat, 02 Jun 2012 14:02:57 +0300\r
34 Message-ID: <m2txyux9ge.fsf@guru.guru-group.fi>\r
35 MIME-Version: 1.0\r
36 Content-Type: text/plain; charset=us-ascii\r
37 X-BeenThere: notmuch@notmuchmail.org\r
38 X-Mailman-Version: 2.1.13\r
39 Precedence: list\r
40 List-Id: "Use and development of the notmuch mail system."\r
41         <notmuch.notmuchmail.org>\r
42 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
43         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
44 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
45 List-Post: <mailto:notmuch@notmuchmail.org>\r
46 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
47 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
48         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
49 X-List-Received-Date: Sat, 02 Jun 2012 11:02:54 -0000\r
50 \r
51 On Fri, Jun 01 2012, Jameson Graef Rollins <jrollins@finestructure.net> wrote:\r
52 \r
53 > There's a bug in the configure script that is causing auto-reruns of\r
54 > ./configure to not inherit original command line options if there was\r
55 > more than one.  For instance, if I run:\r
56 >\r
57 > ./configure --with-gmime-version=2.4 --prefix=/home/jrollins/opt/notmuch\r
58 >\r
59 > Then in Makefile.config I get:\r
60 >\r
61 > configure_options = --with-gmime-version=2.4--prefix=/home/jrollins/opt/notmuch\r
62 >\r
63 > This means that auto-reruns of configure will not get the proper\r
64 > options.\r
65 >\r
66 > I tracked this down to an issue with IFS and /bin/sh.  The first line of\r
67 > ./configure is:\r
68 >\r
69 > readonly DEFAULT_IFS=$IFS\r
70 >\r
71 > DEFAULT_IFS is then used to reset IFS after it is modified within the\r
72 > script.  The problem is that /bin/sh is setting DEFAULT_IFS to be NULL\r
73 > (i.e. ''), which leads to no separation between variables when "$@" is\r
74 > expanded (which is itself problematic since I don't think "@" should use\r
75 > the IFS when expanded).  So this might be a bug in dash.  I don't know.\r
76 > In any event we need to fix this somehow.  \r
77 \r
78 dash manual states that readonly name=value should work, but it seems\r
79 to have some side effects.\r
80 \r
81 I tried some alternatives on command line:\r
82 \r
83 $ readonly FOO1=$IFS\r
84 $ echo "$FOO1" | od -f x1\r
85 0000000 0a\r
86 0000001\r
87 \r
88 $ readonly FOO2="$IFS" \r
89 $ echo "$FOO2" | od -f x1\r
90 0000000 20 09 0a 0a\r
91 0000004\r
92 \r
93 $ FOO3=$IFS\r
94 $ readonly FOO3\r
95 $ echo "$FOO4" | od -f x1\r
96 0000000 20 09 0a 0a\r
97 0000004\r
98 \r
99 I.e. in dash 'readonly name=$value'  $value gets expanded like it was given \r
100 in command line and not when just doing variable assignment.\r
101 \r
102 Easiest is just to drop the 'readonly'; too bad it caused problems :(\r
103 (I have to go now -- but I'll make a patch later unless someone beats \r
104 me by doing it sooner ;)\r
105 \r
106 Tomi\r
107 \r
108 \r
109 > I see two obvious solutions:\r
110 >\r
111 > * use /bin/bash.  This a one line diff that fixes the problem\r
112 >   immediately.\r
113 >\r
114 > * replace:\r
115 >\r
116 >     IFS=$DEFAULT_IFS\r
117 >\r
118 >   with:\r
119 >\r
120 >     unset IFS\r
121 >\r
122 >   Unsetting IFS also resets IFS to the default, without going through\r
123 >   this intermediate step.\r
124 >\r
125 > I'm ok with either solution, but I'll wait for some feedback since I\r
126 > imagine someone will have an opinion.\r
127 >\r
128 > jamie.\r
129 > _______________________________________________\r
130 > notmuch mailing list\r
131 > notmuch@notmuchmail.org\r
132 > http://notmuchmail.org/mailman/listinfo/notmuch\r