[PATCH] lib: reword comment about XFOLDER: prefix
[notmuch-archives.git] / 6d / 6d0a52245fbfb94b5f00c2f9ebaceafc0af872
1 Return-Path: <cworth@cworth.org>\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 A6233431FD0\r
6         for <notmuch@notmuchmail.org>; Wed,  1 Jun 2011 16:22:27 -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.01\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0.01 tagged_above=-999 required=5\r
12         tests=[T_MIME_NO_TEXT=0.01] 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 2WFh9hukCSg1 for <notmuch@notmuchmail.org>;\r
16         Wed,  1 Jun 2011 16:22:26 -0700 (PDT)\r
17 Received: from arlo.cworth.org (arlo.cworth.org [50.43.72.2])\r
18         by olra.theworths.org (Postfix) with ESMTP id B0830431FB6\r
19         for <notmuch@notmuchmail.org>; Wed,  1 Jun 2011 16:22:26 -0700 (PDT)\r
20 Received: from yoom.home.cworth.org (localhost [127.0.0.1])\r
21         by arlo.cworth.org (Postfix) with ESMTP id 85DDC29A4E5;\r
22         Wed,  1 Jun 2011 16:22:25 -0700 (PDT)\r
23 Received: by yoom.home.cworth.org (Postfix, from userid 1000)\r
24         id 75A7B54C02C; Wed,  1 Jun 2011 16:22:25 -0700 (PDT)\r
25 From: Carl Worth <cworth@cworth.org>\r
26 To: Jameson Graef Rollins <jrollins@finestructure.net>,\r
27         Notmuch Mail <notmuch@notmuchmail.org>\r
28 Subject: Re: [PATCH 01/25] fix check for libdir in ldconfig paths\r
29 In-Reply-To: <1306619520-25730-2-git-send-email-jrollins@finestructure.net>\r
30 References: <1306619520-25730-1-git-send-email-jrollins@finestructure.net>\r
31         <1306619520-25730-2-git-send-email-jrollins@finestructure.net>\r
32 User-Agent: Notmuch/0.5 (http://notmuchmail.org) Emacs/23.3.1\r
33         (i486-pc-linux-gnu)\r
34 Date: Wed, 01 Jun 2011 16:22:19 -0700\r
35 Message-ID: <87hb89xhlg.fsf@yoom.home.cworth.org>\r
36 MIME-Version: 1.0\r
37 Content-Type: multipart/signed; boundary="=-=-=";\r
38         micalg=pgp-sha1; protocol="application/pgp-signature"\r
39 X-BeenThere: notmuch@notmuchmail.org\r
40 X-Mailman-Version: 2.1.13\r
41 Precedence: list\r
42 List-Id: "Use and development of the notmuch mail system."\r
43         <notmuch.notmuchmail.org>\r
44 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
45         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
46 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
47 List-Post: <mailto:notmuch@notmuchmail.org>\r
48 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
49 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
50         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
51 X-List-Received-Date: Wed, 01 Jun 2011 23:22:27 -0000\r
52 \r
53 --=-=-=\r
54 Content-Transfer-Encoding: quoted-printable\r
55 \r
56 On Sat, 28 May 2011 14:51:36 -0700, Jameson Graef Rollins <jrollins@finestr=\r
57 ucture.net> wrote:\r
58 > The configure script tries to check that the libdir is included in the\r
59 > ldconfig paths, and then sets the RPATH compiler flag if it's not.\r
60 > This check was broken, and was always setting RPATH.  This fixes the\r
61 > path check.\r
62 \r
63 Thanks for the patch. I was intrigued about what was actually broken\r
64 here, so tracked down the problem and fixed it with an alternate patch\r
65 (see below).\r
66 \r
67 =2DCarl\r
68 \r
69 commit 574f408816e636f677b14384c18cc2e388991411\r
70 Author: Carl Worth <cworth@cworth.org>\r
71 Date:   Wed Jun 1 13:02:58 2011 -0700\r
72 \r
73     configure: Fix detection of libdir in ldconfig configuration\r
74 =20=20=20=20\r
75     Ever since commit b4b5e9ce4dac62111ec11da6d22b7e618056801f the\r
76     detection of libdir in the ldconfig configuration has been broken,\r
77     resulting in RPATH being set when not needed and not wanted.\r
78 =20=20=20=20\r
79     The cause was a change from an IFS setting of:\r
80 =20=20=20=20\r
81         IFS=3D"$(printf '\n\t')"\r
82 =20=20=20=20\r
83     to a new setting of:\r
84 =20=20=20=20\r
85         IFS=3D"$(printf '\n')"\r
86 =20=20=20=20\r
87     That looks desirable since we want to split the output of ldconfig\r
88     based on newlines, (and not split on any filename that might have an\r
89     embedded tab in it). The subtle bug in the above is that the shell\r
90     trims any trailing newlines when performing command substitution so\r
91     the final statement above was equivalent to:\r
92 =20=20=20=20\r
93         IFS=3D''\r
94 =20=20=20=20\r
95     which prevented any splitting of the ldconfig output at all.\r
96 =20=20=20=20\r
97     Fix this by avoiding command substitution and just using a literal\r
98     newline in the source file for setting this variable.\r
99 \r
100 diff --git a/configure b/configure\r
101 index bbf30cd..cf525c9 100755\r
102 =2D-- a/configure\r
103 +++ b/configure\r
104 @@ -355,17 +355,30 @@ elif [ $uname =3D "Linux" ] ; then\r
105      printf "Linux\n"\r
106      platform=3DLINUX\r
107      linker_resolves_library_dependencies=3D1\r
108 +\r
109 +    printf "Checking for $libdir_expanded in ldconfig... "\r
110      ldconfig_paths=3D$(/sbin/ldconfig -N -X -v 2>/dev/null | sed -n -e 's,=\r
111 ^\(/.*\):\( (.*)\)\?$,\1,p')\r
112      # Separate ldconfig_paths only on newline (not on any potential\r
113 =2D    # embedded space characters in any filenames).\r
114 +    # embedded space characters in any filenames). Note, we use a\r
115 +    # literal newline in the source here rather than something like:\r
116 +    #\r
117 +    #  IFS=3D$(printf '\n')\r
118 +    #\r
119 +    # because the shell's command substitution deletes any trailing newlin=\r
120 es.\r
121      OLD_IFS=3D$IFS\r
122 =2D    IFS=3D"$(printf '\n')"\r
123 +    IFS=3D"\r
124 +"\r
125      for path in $ldconfig_paths; do\r
126         if [ "$path" =3D "$libdir_expanded" ]; then\r
127             libdir_in_ldconfig=3D1\r
128         fi\r
129      done\r
130      IFS=3D$OLD_IFS\r
131 +    if [ "$libdir_in_ldconfig" =3D '0' ]; then\r
132 +       printf "No (will set RPATH)\n"\r
133 +    else\r
134 +       printf "Yes\n"\r
135 +    fi\r
136  else\r
137      printf "Unknown.\n"\r
138      cat <<EOF\r
139 \r
140 --=-=-=\r
141 Content-Type: application/pgp-signature\r
142 \r
143 -----BEGIN PGP SIGNATURE-----\r
144 Version: GnuPG v1.4.11 (GNU/Linux)\r
145 \r
146 iEYEARECAAYFAk3myasACgkQ6JDdNq8qSWgapACeO5E614leiZST1GvFrmB3eoTT\r
147 D00AnjzUj5M/dJDD6I+QVwfzlMcFGbeo\r
148 =+wRA\r
149 -----END PGP SIGNATURE-----\r
150 --=-=-=--\r