1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-31 05:41:08 +00:00

databases/evolution-data-server: make usable when sqlite3 has option DQS disabled

This port uses "%s" in some SQL queries where '%s' should have been
used.  When the DQS (double-quoted string) misfeatures of SQLite3 is
disabled, these queries fail and cause the error "no such column: %s".
Change these queries to fix evolution.

PR:		278249
Approved by:	fluffy (gnome)
MFH:		2024Q2
This commit is contained in:
Robert Clausecker 2024-04-08 11:52:26 +02:00
parent 9d8284db83
commit 50154e657e
2 changed files with 37 additions and 1 deletions

View File

@ -1,6 +1,6 @@
PORTNAME= evolution-data-server
DISTVERSION= 3.44.4
PORTREVISION= 6
PORTREVISION= 7
CATEGORIES= databases gnome
MASTER_SITES= GNOME
DIST_SUBDIR= gnome

View File

@ -0,0 +1,36 @@
Allow evolution to be used when databases/sqlite3 has been compiled
with option DQS disabled.
--- src/camel/camel-db.c.orig 2024-04-08 09:37:09 UTC
+++ src/camel/camel-db.c
@@ -1823,8 +1823,8 @@ camel_db_migrate_folder_prepare (CamelDB *cdb,
"mail_to , mail_cc , mlist , followup_flag , "
"followup_completed_on , followup_due_by , "
"part , labels , usertags , cinfo , bdata , '', '', "
- "strftime(\"%%s\", 'now'), "
- "strftime(\"%%s\", 'now') FROM %Q",
+ "strftime('%%s', 'now'), "
+ "strftime('%%s', 'now') FROM %Q",
folder_name, folder_name);
ret = camel_db_add_to_transaction (cdb, table_creation_query, error);
sqlite3_free (table_creation_query);
@@ -2093,8 +2093,8 @@ camel_db_write_message_info_record (CamelDB *cdb,
"%Q, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, "
"%lld, %lld, %Q, %Q, %Q, %Q, %Q, %Q, %Q, %Q, "
"%Q, %Q, %Q, %Q, %Q, %Q, %Q, "
- "strftime(\"%%s\", 'now'), "
- "strftime(\"%%s\", 'now') )",
+ "strftime('%%s', 'now'), "
+ "strftime('%%s', 'now') )",
folder_name,
record->uid,
record->flags,
@@ -2578,7 +2578,7 @@ camel_db_rename_folder (CamelDB *cdb,
ret = camel_db_add_to_transaction (cdb, cmd, error);
sqlite3_free (cmd);
- cmd = sqlite3_mprintf ("UPDATE %Q SET modified=strftime(\"%%s\", 'now'), created=strftime(\"%%s\", 'now')", new_folder_name);
+ cmd = sqlite3_mprintf ("UPDATE %Q SET modified=strftime('%%s', 'now'), created=strftime('%%s', 'now')", new_folder_name);
ret = camel_db_add_to_transaction (cdb, cmd, error);
sqlite3_free (cmd);