Add store::consume_message, which is like add message but std::move from
the caller such that the messages longer has copies (with
Xapian::Document) on the caller side; this is to avoid threading issues.
Seems journal logging fails on NetBSD (no surprise), but has some
unwanted/not-fully-understood side-effects.
In any case, outside Linux there's no use in even trying to use
journald; so we don't do that anymore.
Add conditional support for syslog (requires glib 2.80).
According to the readdir(2) man-page, not all file-systems support returning the
entry's file-type in `d_type`. For example, the reprotest reproducibility tool,
uses the disorderfs FUSE file-system to shuffle the order in which directory
entries are returned, and this does not set `d_type`. Therefore, in addition to
entries with type `DT_DIR` and `DT_LNK`, also process entries with type
`DT_UNKNOWN`.
Signed-off-by: Jeremy Sowden <azazel@debian.org>
Only include xapian.h in one place, so we can have consistent options.
With that in place, we can enable C++ move semantics.
We don't do anything with that yet, but we check in the meson.build file
to see if we have the required xapian version.
In musl, `stdout` is a macro that expands to `(stdout)`, and
`::(stdout)` is not valid C++.
../mu-1.12.2/lib/utils/mu-utils.hh:268:32: error: expected
id-expression before '(' token
268 | ::stdout);
| ^~~~~~
Nothing in the Mu namespace is named stdout, so it is safe to drop
the `::`.
Bug: https://bugs.gentoo.org/928361
Flag message that merely have a List-Unsubscribe header with
Flags::MailingList too (some marketing message have this header, yet
miss "List-Id".
Add a test as well.
Instead of handling transactions in the store, handle it in xapian-db.
Make the code a bit more natural / cleaner-out
Handle transaction automatically (with a batch-size) and add some RAII
Transaction object, which makes all database interaction transactable
for the duration. So, no more need for explicit parameters to
add_message while indexing.