From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id kDUlEMuk+GS0GwEAauVa8A:P1 (envelope-from ) for ; Wed, 06 Sep 2023 18:11:55 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id kDUlEMuk+GS0GwEAauVa8A (envelope-from ) for ; Wed, 06 Sep 2023 18:11:55 +0200 Received: from mail.notmuchmail.org (yantan.tethera.net [IPv6:2a01:4f9:c011:7a79::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id F0AED35BED for ; Wed, 6 Sep 2023 18:11:54 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=redhat.com header.s=mimecast20190719 header.b=MQnLaHMI; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org; dmarc=fail reason="SPF not aligned (relaxed)" header.from=redhat.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1694016715; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=ejk/Mht80w77e6yaASceEaafT10OhCvkYRM1TCSwBuA=; b=CBcJn3sWcZnZLLxAjA/Za6nnGm4x5OmP676MQH1A4ZLX/8bOHw2Q8DdHuBC+K3ecv2DMz4 ETzPtZ9mD3HO+pVhKIs1JpIsg3tjH0g1mrwdztFx6FZaH8YPsBnoUstqWlC1T8paIY2iD0 D9jP6mtLM9XcxeK2wdbsdQghCizxL70R91inYkMkxyElQQpcDKjNbjz6AXo4Lx8hCKpatx W4+0fD5vgCvjeqcxzM5k/LfKiuyb0phwEyx3BJ/M3MLtK09+reX1IxscguiEE1HuuJ4mJz OMGxFt5JlHfjrYpwcVs3LoxxJXNGJolD/Tot5MeMhjYJoJJDp23P40N6jehShQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1694016715; a=rsa-sha256; cv=none; b=HXDith0hCl45tRdtNoSjDPbxRzyVfW+8F1d+juE0XqlTfSxsrXvHPHiLj/aGpRb5WaWz7e 2Coa0vt5uvxh4DlEWAuIEoPEHGfEuRGtFjSmhZ3a6xHuxYcAgS6KAkRpSzjbZVZgESWaPs tJt8saoDUlFo3sqhnh0RJutVs0qqOclE9H0mq5HJLtsinhDhGG2aAm/Fm/ZPByb46MMSh8 m4/ES0A6xC8Xhtx34ffAYST6hUGaXiUqbeJ+qbTRra5YFZMxmaqKNvGVMg9gjKhA3jyVhl P5JHLARm9MKco6hKqw6Fu0YIPQil9ztJ/Bn1yU+ymbUjyHl2c2D9z0rrLdhgBg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=redhat.com header.s=mimecast20190719 header.b=MQnLaHMI; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org; dmarc=fail reason="SPF not aligned (relaxed)" header.from=redhat.com (policy=none) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id C260E60957; Wed, 6 Sep 2023 16:11:52 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mail.notmuchmail.org (Postfix) with ESMTPS id BFA6F60954 for ; Wed, 6 Sep 2023 16:11:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694016709; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=nhT8+7Rq3YGoI2yvvJi4XMb0txpLILB2NLpdaJL8CE8=; b=MQnLaHMIiK0eR879nw/7M2u4ugr00eX28dPa6K+fLjIsr0HEMpyOcSDX+ZOPMr3C0WpD3J FyHqwUkfRv3mWpto+UJcskYy5QqMsw5pbIURKNpULxgJkLd45FMP9PJTVxvXaV6RZOlKq8 LS70E5siq4KZBL4US1LgZdlqJO5BabQ= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-307-PecID_prOQ68RggTquLAgg-1; Wed, 06 Sep 2023 12:11:46 -0400 X-MC-Unique: PecID_prOQ68RggTquLAgg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 88EF03C0E450; Wed, 6 Sep 2023 16:11:45 +0000 (UTC) Received: from redhat.com (unknown [10.2.16.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7E9CC4024322; Wed, 6 Sep 2023 16:11:44 +0000 (UTC) Date: Wed, 6 Sep 2023 11:11:42 -0500 From: Eric Blake To: David Bremner Subject: Re: [PATCH] config: Inform user if config file is broken Message-ID: References: <5a7paaqa2dvdo5lmnxvaeacfwhdytfnkr4gfh6mtlotdviki2s@ro4gz4m2aqsw> <20230906153402.101471-1-eblake@redhat.com> <87o7if1eww.fsf@tethera.net> MIME-Version: 1.0 In-Reply-To: <87o7if1eww.fsf@tethera.net> User-Agent: NeoMutt/20230517 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Message-ID-Hash: KDB2D7HA3L3SFKZMQCVUAZEQHGYB2JP7 X-Message-ID-Hash: KDB2D7HA3L3SFKZMQCVUAZEQHGYB2JP7 X-MailFrom: eblake@redhat.com X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0 CC: notmuch@notmuchmail.org X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Country: DE X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx2.migadu.com X-Spam-Score: -3.13 X-Migadu-Queue-Id: F0AED35BED X-Migadu-Spam-Score: -3.13 X-TUID: 9EBXPlihwmDg On Wed, Sep 06, 2023 at 12:48:15PM -0300, David Bremner wrote: > Eric Blake writes: > > > > > I'm not sure if this is the best approach (as this is my first ever > > patch to notmuch), but it's better than nothing. > > Unfortunately we can't just print from there because it is in a shared > library (whose clients might not appreciate output). Something _almost_ > equivalent can be done with _notmuch_database_log, but that still > requires the caller to read those logs with > notmuch_database_status_string. I'm out of time to spend further on this bug today; if you would like to take the ideas in my patch and rework it into something usable, be my guest. Otherwise, I might be able to return to this bug later in the week to see if I can figure out how to grab the database_log at the right point when status is NOTMUCH_STATUS_FILE_ERROR is returned (open.cc:notmuch_database_load_config DONE label looks like it should be able to grab from the database log if status_string is present). -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org