From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 0456E431FBF for ; Mon, 23 Nov 2009 07:16:30 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 VKwz49qiBKru for ; Mon, 23 Nov 2009 07:16:29 -0800 (PST) Received: from mail-bw0-f210.google.com (mail-bw0-f210.google.com [209.85.218.210]) by olra.theworths.org (Postfix) with ESMTP id 1145F431FAE for ; Mon, 23 Nov 2009 07:16:28 -0800 (PST) Received: by bwz2 with SMTP id 2so5331320bwz.0 for ; Mon, 23 Nov 2009 07:16:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:cc:subject :in-reply-to:references:date:message-id:mime-version:content-type; bh=+aIEuOf/4k18Per14zsupsFm+aA9K+KWiTWUbeNc8XE=; b=GQUlTxNjib2VgVvYNP1FlHB4UEPEc3YIOXCqiUbXsX61achB9ICSCxTQzr/Ui4PtG7 hKBOo+W9zntHnQ/RsKA9Ux086Tag6Rhwcm0E2Pg4kq49YrOucHKvtNPt+EjlVAutinWI 8HXAYMNKOlabJ9ozt+FCxtN+/9I8ChV1xU7DI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; b=LT684svN2bRvyb/x3s2Y/NzcwT3vjenjP8Yiv6LvMTB2wskz3+4jqekWKG/MVm2EJe soBj2BcL8xjbaeYHuMDMWcxItlrnnXUXHSOtfIVIdKKQ9b11jxMwQdX7adkpiazERNzN FFM0ZGj3guwwOUn9O4xKK0hBjzg0jDONvKjXA= Received: by 10.204.24.83 with SMTP id u19mr4927294bkb.22.1258989387888; Mon, 23 Nov 2009 07:16:27 -0800 (PST) Received: from kunyang (vawpc43.ethz.ch [129.132.59.11]) by mx.google.com with ESMTPS id g28sm5836576fkg.38.2009.11.23.07.16.25 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 23 Nov 2009 07:16:26 -0800 (PST) Sender: Jed Brown From: Jed Brown To: Tassilo Horn , Mikhail Gusarov In-Reply-To: <871vjpl1yi.fsf@thinkpad.tsdh.de> References: <87ws1hldmu.fsf@thinkpad.tsdh.de> <87einpl50j.fsf@thinkpad.tsdh.de> <87ljhxjq5i.fsf@vertex.dottedmag> <876391l2si.fsf@thinkpad.tsdh.de> <871vjpl1yi.fsf@thinkpad.tsdh.de> Date: Mon, 23 Nov 2009 16:16:58 +0100 Message-ID: <87tywl46fp.fsf@59A2.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: notmuch@notmuchmail.org Subject: Re: Notmuch doesn't index new mails when mail location contains symlinks X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Mon, 23 Nov 2009 15:16:30 -0000 On Mon, 23 Nov 2009 16:01:41 +0100, Tassilo Horn wrote: > Tassilo Horn writes: > I don't have to touch the symlinks or the directories inside the > locations the symlinks point to, but instead I have to touch the > top-level directory where the symlinks are contained in. Ah, it's slightly more subtle. Notmuch correctly uses stat() instead of lstat() to check whether the link target changed. However, mtime for your mail root directory (containing the symlinks) does not get updated when the target of the symlinks is updated. I think the only way to fix this is to replace the current search (which skips a directory as soon as it's mtime is older than the database) with one that enters all directories so that symlinks are actually followed. Jed