1 Return-Path: <bgamari.foss@gmail.com>
\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 AAD27431FB6
\r
6 for <notmuch@notmuchmail.org>; Mon, 14 Oct 2013 18:13:25 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5
\r
12 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
\r
13 FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
14 Received: from olra.theworths.org ([127.0.0.1])
\r
15 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id PFnhoxUrcXyL for <notmuch@notmuchmail.org>;
\r
17 Mon, 14 Oct 2013 18:13:19 -0700 (PDT)
\r
18 Received: from mail-qa0-f47.google.com (mail-qa0-f47.google.com
\r
19 [209.85.216.47]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
20 (No client certificate requested)
\r
21 by olra.theworths.org (Postfix) with ESMTPS id 40808431FBC
\r
22 for <notmuch@notmuchmail.org>; Mon, 14 Oct 2013 18:13:15 -0700 (PDT)
\r
23 Received: by mail-qa0-f47.google.com with SMTP id k15so2734854qaq.20
\r
24 for <notmuch@notmuchmail.org>; Mon, 14 Oct 2013 18:13:13 -0700 (PDT)
\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
\r
26 h=from:to:cc:subject:date:message-id:in-reply-to:references;
\r
27 bh=IsbVoZWV/iJTZET2+vfs0WqvzmI7pzc5BhPNPZqMIwE=;
\r
28 b=0GPfcyo3lhWuA/mYaWJZEdIEEh+zQrZK03GJJRaET5WKC4NRRkeiZishpYNCL4J+31
\r
29 nc4z7wxJeVHwkZdIbM44lnubiJEo1bUdS+1iI2/V2LLrlGKOSJjgc8u/Gl19+4yfUXWm
\r
30 scKW4kmFW8hc2bTG6roOopPQe23mypU8etYh36Ak1vJcdaIebVDizDmjUscOMAvPBtak
\r
31 fyBwzu6/oMpvmdWuSyRKV3s3od5KTm62z/Mxf5+M2KBOMDYCCXiEcaN5zvN+j6fUcJb6
\r
32 vpC5pVn8Xy7YGtrmSx2mxyYQzPETj6G7qA3cQ52C2+ZtCOhq0Zy/RbzEEqpX5BnTW50m
\r
34 X-Received: by 10.224.126.197 with SMTP id d5mr39129880qas.1.1381799593665;
\r
35 Mon, 14 Oct 2013 18:13:13 -0700 (PDT)
\r
36 Received: from localhost.localdomain
\r
37 (pool-108-8-224-250.spfdma.east.verizon.net. [108.8.224.250])
\r
38 by mx.google.com with ESMTPSA id
\r
39 og1sm105736333qeb.3.1969.12.31.16.00.00
\r
40 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
\r
41 Mon, 14 Oct 2013 18:13:13 -0700 (PDT)
\r
42 From: Ben Gamari <bgamari.foss@gmail.com>
\r
43 To: notmuch@notmuchmail.org
\r
44 Subject: [PATCH 3/3] compact: Provide user with more error feedback
\r
45 Date: Mon, 14 Oct 2013 21:13:05 -0400
\r
46 Message-Id: <1381799585-16274-4-git-send-email-bgamari.foss@gmail.com>
\r
47 X-Mailer: git-send-email 1.8.1.2
\r
48 In-Reply-To: <1381799585-16274-1-git-send-email-bgamari.foss@gmail.com>
\r
49 References: <1381799585-16274-1-git-send-email-bgamari.foss@gmail.com>
\r
50 X-BeenThere: notmuch@notmuchmail.org
\r
51 X-Mailman-Version: 2.1.13
\r
53 List-Id: "Use and development of the notmuch mail system."
\r
54 <notmuch.notmuchmail.org>
\r
55 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
56 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
57 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
58 List-Post: <mailto:notmuch@notmuchmail.org>
\r
59 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
60 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
61 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
62 X-List-Received-Date: Tue, 15 Oct 2013 01:13:26 -0000
\r
64 Provide instructions on what to do when we couldn't move the compacted
\r
65 database into place.
\r
67 Signed-off-by: Ben Gamari <bgamari.foss@gmail.com>
\r
69 lib/database.cc | 18 +++++++++++++++++-
\r
70 1 file changed, 17 insertions(+), 1 deletion(-)
\r
72 diff --git a/lib/database.cc b/lib/database.cc
\r
73 index 57c2292..6f9fed1 100644
\r
74 --- a/lib/database.cc
\r
75 +++ b/lib/database.cc
\r
76 @@ -938,7 +938,23 @@ notmuch_database_compact (const char* path,
\r
79 if (rename(compact_xapian_path, xapian_path)) {
\r
80 - fprintf (stderr, "Error moving compacted database\n");
\r
81 + fprintf (stderr, "Error moving compacted database into place: %s\n", strerror(errno));
\r
82 + fprintf (stderr, "\n");
\r
83 + fprintf (stderr, "Encountered error %s while moving the compacted database,\n",
\r
85 + fprintf (stderr, "\n");
\r
86 + fprintf (stderr, " %s\n", compact_xapian_path);
\r
87 + fprintf (stderr, "\n");
\r
88 + fprintf (stderr, "to\n");
\r
89 + fprintf (stderr, "\n");
\r
90 + fprintf (stderr, " %s\n", xapian_path);
\r
91 + fprintf (stderr, "\n");
\r
92 + fprintf (stderr, "Please identify the reason for this and move the compacted database into place manually.\n");
\r
93 + if (backup_path != NULL) {
\r
94 + fprintf (stderr, "Otherwise, you can revert to the backup database located at,\n");
\r
95 + fprintf (stderr, "\n");
\r
96 + fprintf (stderr, " %s\n", backup_path);
\r
98 ret = NOTMUCH_STATUS_FILE_ERROR;
\r