mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-22 02:48:08 +01:00
Merge branch 'release'
This commit is contained in:
commit
d4e9b9072c
9 changed files with 48 additions and 7 deletions
3
NEWS
3
NEWS
|
@ -1,3 +1,6 @@
|
||||||
|
Notmuch 0.38.1 (UNRELEASED)
|
||||||
|
===========================
|
||||||
|
|
||||||
Notmuch 0.38 (2023-09-12)
|
Notmuch 0.38 (2023-09-12)
|
||||||
=========================
|
=========================
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
# this file should be kept in sync with ../../../version
|
# this file should be kept in sync with ../../../version
|
||||||
__VERSION__ = '0.38'
|
__VERSION__ = '0.38.1~pre0'
|
||||||
SOVERSION = '5'
|
SOVERSION = '5'
|
||||||
|
|
6
debian/changelog
vendored
6
debian/changelog
vendored
|
@ -1,3 +1,9 @@
|
||||||
|
notmuch (0.38.1~pre0-1) UNRELEASED; urgency=medium
|
||||||
|
|
||||||
|
* New upstream release release candidate
|
||||||
|
|
||||||
|
-- David Bremner <bremner@debian.org> Sat, 23 Sep 2023 08:15:19 -0300
|
||||||
|
|
||||||
notmuch (0.38-2) unstable; urgency=medium
|
notmuch (0.38-2) unstable; urgency=medium
|
||||||
|
|
||||||
* Restrict autopkgtests to amd64 and aarch64. There are failures in
|
* Restrict autopkgtests to amd64 and aarch64. There are failures in
|
||||||
|
|
|
@ -416,7 +416,8 @@ _expand_path (void *ctx, const char *key, const char *val)
|
||||||
|
|
||||||
notmuch_status_t
|
notmuch_status_t
|
||||||
_notmuch_config_load_from_file (notmuch_database_t *notmuch,
|
_notmuch_config_load_from_file (notmuch_database_t *notmuch,
|
||||||
GKeyFile *file)
|
GKeyFile *file,
|
||||||
|
char **status_string)
|
||||||
{
|
{
|
||||||
notmuch_status_t status = NOTMUCH_STATUS_SUCCESS;
|
notmuch_status_t status = NOTMUCH_STATUS_SUCCESS;
|
||||||
gchar **groups = NULL, **keys, *val;
|
gchar **groups = NULL, **keys, *val;
|
||||||
|
@ -435,6 +436,7 @@ _notmuch_config_load_from_file (notmuch_database_t *notmuch,
|
||||||
for (gchar **keys_p = keys; *keys_p; keys_p++) {
|
for (gchar **keys_p = keys; *keys_p; keys_p++) {
|
||||||
char *absolute_key = talloc_asprintf (notmuch, "%s.%s", *grp, *keys_p);
|
char *absolute_key = talloc_asprintf (notmuch, "%s.%s", *grp, *keys_p);
|
||||||
char *normalized_val;
|
char *normalized_val;
|
||||||
|
GError *gerr = NULL;
|
||||||
|
|
||||||
/* If we opened from a given path, do not overwrite it */
|
/* If we opened from a given path, do not overwrite it */
|
||||||
if (strcmp (absolute_key, "database.path") == 0 &&
|
if (strcmp (absolute_key, "database.path") == 0 &&
|
||||||
|
@ -442,7 +444,14 @@ _notmuch_config_load_from_file (notmuch_database_t *notmuch,
|
||||||
notmuch->xapian_db)
|
notmuch->xapian_db)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
val = g_key_file_get_string (file, *grp, *keys_p, NULL);
|
val = g_key_file_get_string (file, *grp, *keys_p, &gerr);
|
||||||
|
if (gerr) {
|
||||||
|
if (status_string)
|
||||||
|
IGNORE_RESULT (asprintf (status_string,
|
||||||
|
"GLib: %s\n",
|
||||||
|
gerr->message));
|
||||||
|
g_error_free (gerr);
|
||||||
|
}
|
||||||
if (! val) {
|
if (! val) {
|
||||||
status = NOTMUCH_STATUS_FILE_ERROR;
|
status = NOTMUCH_STATUS_FILE_ERROR;
|
||||||
goto DONE;
|
goto DONE;
|
||||||
|
|
|
@ -726,7 +726,7 @@ notmuch_status_t
|
||||||
_notmuch_config_load_from_database (notmuch_database_t *db);
|
_notmuch_config_load_from_database (notmuch_database_t *db);
|
||||||
|
|
||||||
notmuch_status_t
|
notmuch_status_t
|
||||||
_notmuch_config_load_from_file (notmuch_database_t *db, GKeyFile *file);
|
_notmuch_config_load_from_file (notmuch_database_t *db, GKeyFile *file, char **status_string);
|
||||||
|
|
||||||
notmuch_status_t
|
notmuch_status_t
|
||||||
_notmuch_config_load_defaults (notmuch_database_t *db);
|
_notmuch_config_load_defaults (notmuch_database_t *db);
|
||||||
|
|
|
@ -555,7 +555,7 @@ _finish_open (notmuch_database_t *notmuch,
|
||||||
goto DONE;
|
goto DONE;
|
||||||
|
|
||||||
if (key_file)
|
if (key_file)
|
||||||
status = _notmuch_config_load_from_file (notmuch, key_file);
|
status = _notmuch_config_load_from_file (notmuch, key_file, &message);
|
||||||
if (status)
|
if (status)
|
||||||
goto DONE;
|
goto DONE;
|
||||||
|
|
||||||
|
@ -961,7 +961,7 @@ notmuch_database_load_config (const char *database_path,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (key_file) {
|
if (key_file) {
|
||||||
status = _notmuch_config_load_from_file (notmuch, key_file);
|
status = _notmuch_config_load_from_file (notmuch, key_file, &message);
|
||||||
if (status)
|
if (status)
|
||||||
goto DONE;
|
goto DONE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -563,6 +563,12 @@ main (int argc, char *argv[])
|
||||||
NULL,
|
NULL,
|
||||||
¬much,
|
¬much,
|
||||||
&status_string);
|
&status_string);
|
||||||
|
if (status_string) {
|
||||||
|
fputs (status_string, stderr);
|
||||||
|
free (status_string);
|
||||||
|
status_string = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case NOTMUCH_STATUS_NO_CONFIG:
|
case NOTMUCH_STATUS_NO_CONFIG:
|
||||||
if (! (command->mode & NOTMUCH_COMMAND_CONFIG_CREATE)) {
|
if (! (command->mode & NOTMUCH_COMMAND_CONFIG_CREATE)) {
|
||||||
|
@ -584,6 +590,8 @@ main (int argc, char *argv[])
|
||||||
case NOTMUCH_STATUS_SUCCESS:
|
case NOTMUCH_STATUS_SUCCESS:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
fputs ("Error: unable to load config file.\n", stderr);
|
||||||
|
ret = 1;
|
||||||
goto DONE;
|
goto DONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,8 @@
|
||||||
test_description='"notmuch config"'
|
test_description='"notmuch config"'
|
||||||
. $(dirname "$0")/test-lib.sh || exit 1
|
. $(dirname "$0")/test-lib.sh || exit 1
|
||||||
|
|
||||||
|
cp notmuch-config initial-config
|
||||||
|
|
||||||
test_begin_subtest "Get string value"
|
test_begin_subtest "Get string value"
|
||||||
test_expect_equal "$(notmuch config get user.name)" "Notmuch Test Suite"
|
test_expect_equal "$(notmuch config get user.name)" "Notmuch Test Suite"
|
||||||
|
|
||||||
|
@ -193,4 +195,17 @@ test_begin_subtest "get built_with.nonexistent prints false"
|
||||||
output=$(notmuch config get built_with.nonexistent)
|
output=$(notmuch config get built_with.nonexistent)
|
||||||
test_expect_equal "$output" "false"
|
test_expect_equal "$output" "false"
|
||||||
|
|
||||||
|
test_begin_subtest "Bad utf8 reported as error"
|
||||||
|
cp initial-config bad-config
|
||||||
|
printf '[query]\nq3=from:\xff\n' >>bad-config
|
||||||
|
test_expect_code 1 "notmuch --config=./bad-config config list"
|
||||||
|
|
||||||
|
test_begin_subtest "Specific error message about bad utf8"
|
||||||
|
notmuch --config=./bad-config config list 2>ERRORS
|
||||||
|
cat <<EOF > EXPECTED
|
||||||
|
GLib: Key file contains key “q3” with value “from:<3A>” which is not UTF-8
|
||||||
|
Error: unable to load config file.
|
||||||
|
EOF
|
||||||
|
test_expect_equal_file EXPECTED ERRORS
|
||||||
|
|
||||||
test_done
|
test_done
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
0.38
|
0.38.1~pre0
|
||||||
|
|
Loading…
Reference in a new issue