From: Patrick Totzke Date: Sun, 5 May 2013 21:22:44 +0000 (+0100) Subject: [CLI] bug in notmuch setup X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7d92ea4ce34f9622981dd13736711e05a7b6035d;p=notmuch-archives.git [CLI] bug in notmuch setup --- diff --git a/ed/94bd64aa0535bcacec1f5fcf198ec988c0e9c5 b/ed/94bd64aa0535bcacec1f5fcf198ec988c0e9c5 new file mode 100644 index 000000000..861c67e2c --- /dev/null +++ b/ed/94bd64aa0535bcacec1f5fcf198ec988c0e9c5 @@ -0,0 +1,136 @@ +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 23C63431FBD + for ; Sun, 5 May 2013 14:22:56 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.799 +X-Spam-Level: +X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] 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 0hiKRaFue74T for ; + Sun, 5 May 2013 14:22:50 -0700 (PDT) +Received: from mail-wi0-f175.google.com (mail-wi0-f175.google.com + [209.85.212.175]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 6AA1C431FAE + for ; Sun, 5 May 2013 14:22:50 -0700 (PDT) +Received: by mail-wi0-f175.google.com with SMTP id h11so2004262wiv.2 + for ; Sun, 05 May 2013 14:22:47 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; + h=x-received:content-type:mime-version:content-disposition:to + :message-id:from:user-agent:subject:date; + bh=/orZukd//0tucQ5/gtLbv3y3xc5XTymDMfRWxrCCiZM=; + b=s+4bLTc3SCPNlMba1+o4TYjBbLM+RSVVbALoAwQ63yt47ezbt17s4XiXVaGlEdgXlo + L3/CqlVPBsfW1ZD2t+sCM+UnjORhBhVRwihHiG01KK/uaI6yvH9uSc9zllSCF09OWVkp + 1dANcpHkDF7f2feuwU6MvF0wl2letWlDH4kLgW13eJ7WtZfd0dfjzriWn3qgAotjJgQK + t8SrLo+4oZV+SHE4Ezkvq6Ehh2FOTXh/nKCRxIFY99sO10/A2u5k2hTUdtbdFhFKEwDr + lGE1v11vryyIzgj0BOg90Se+wqMiXTh17smpQAo7GigEXVf9t87BKv0QuIGxq/gJNiI1 + mlfA== +X-Received: by 10.180.206.204 with SMTP id lq12mr5808741wic.30.1367788967815; + Sun, 05 May 2013 14:22:47 -0700 (PDT) +Received: from localhost (cpc14-sgyl28-2-0-cust332.18-2.cable.virginmedia.com. + [82.39.85.77]) + by mx.google.com with ESMTPSA id m13sm3737860wiw.7.2013.05.05.14.22.46 + for + (version=TLSv1.2 cipher=RC4-SHA bits=128/128); + Sun, 05 May 2013 14:22:47 -0700 (PDT) +Content-Type: multipart/signed; protocol="application/pgp-signature"; + micalg="pgp-sha1"; boundary="===============6540599420040082609==" +MIME-Version: 1.0 +Content-Disposition: inline +To: notmuch@notmuchmail.org +Message-ID: <20130505212244.13465.1871@brick> +From: Patrick Totzke +User-Agent: alot/0.3.4 +Subject: [CLI] bug in notmuch setup +Date: Sun, 05 May 2013 22:22:44 +0100 +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: Sun, 05 May 2013 21:22:56 -0000 + +--===============6540599420040082609== +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: quoted-printable + +Hi all, + +As mentioned on IRC earlier, current master seems to have an issue with `no= +tmuch setup`, +which fails to write ~/.notmuch-config if not already present. + +Here are excerpts from the discussion from #notmuch: +--------------------------------------%<-----------------------------------= +---- +19:08:29 i have no notmuch config so far. when i run `notmuch` i get= + questioned about my name and so forth. = + + then: +19:08:31 Error canonicalizing /home/pazz/.notmuch-config: No such fi= +le or directory +19:14:01 it could also be a bug. There was some change recently t= +o avoid overwriting symlinks with files. +19:15:29 pazz: I think you found a bug. try "touch .notmuch-confi= +g" and run notmuch-setup again. +19:21:54 bremner: i'm a little confused because i thought i'd done t= +hat already. anyway: notmuch setup = + + fails iff there is no ~/.notmuch-config present. +19:22:38 if there is an empty file notmuch setup runs ok, exit code = +is 0 and the file gets overwritten +... +19:43:55 Error canonicalizing /home/too/.notmuch-config: No such fi= +le or directory +19:46:52 apparently realpath(3) fails in case there is no such file= + ;/ +19:50:50 forgot to mention: i'm on 0.15.2+85~g44fe1f2d +19:52:55 yeah, the offending patch is +79, I think +19:53:25 the reason is obvious .. notmuch_config_save() executes = + filename =3D realpath + (config->filename, NULL); +19:53:53 maybe just additionally checking for ENOENT could fix that= +... +19:57:20 sounds plausible. Have to double check we are not relyin= +g on some implicit re-allocation by = + + realpath. +19:58:41 true: free (filename) needs not to be done in case realpat= +h() fails with ENOENT + +-------------------------------------->%-----------------------------------= +---- + +Best, +/p + +--===============6540599420040082609== +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Content-Description: signature +Content-Type: application/pgp-signature; name="signature.asc"; charset="us-ascii" + +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.12 (GNU/Linux) + +iEYEABECAAYFAlGGzaQACgkQlDQDZ9fWxar2/QCfR9GUqp/LTmf+oFOhgrdlAyRO +OkIAoJQGpZssIzRgckeBzybQ+xorHZuy +=doKC +-----END PGP SIGNATURE----- + +--===============6540599420040082609==--