(backport) disable sqlite_unicode deprecation warning

f38
Adam Williamson 4 years ago
parent d3f9759b84
commit 031ce69567

@ -0,0 +1,29 @@
From 6e7986e8d410cb25ded2ab958108170dc3835038 Mon Sep 17 00:00:00 2001
From: Kenichi Ishigaki <ishigaki@cpan.org>
Date: Fri, 30 Jul 2021 06:05:13 +0900
Subject: [PATCH] Silence the deprecation warning of sqlite_unicode as it's so
widely used
---
dbdimp.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dbdimp.c b/dbdimp.c
index a8361ac..6dbff60 100644
--- a/dbdimp.c
+++ b/dbdimp.c
@@ -857,7 +857,10 @@ sqlite_db_STORE_attrib(SV *dbh, imp_dbh_t *imp_dbh, SV *keysv, SV *valuesv)
}
if (strEQ(key, "sqlite_unicode") || strEQ(key, "unicode")) {
- _warn_deprecated_if_possible(key, "sqlite_string_mode");
+ if (strEQ(key, "unicode")) {
+ /* it's too early to warn the deprecation of sqlite_unicode as it's widely used */
+ _warn_deprecated_if_possible(key, "sqlite_string_mode");
+ }
#if PERL_UNICODE_DOES_NOT_WORK_WELL
sqlite_trace(dbh, imp_dbh, 3, form("Unicode support is disabled for this version of perl."));
imp_dbh->string_mode = DBD_SQLITE_STRING_MODE_PV;
--
2.32.0

@ -3,7 +3,7 @@
Name: perl-DBD-SQLite Name: perl-DBD-SQLite
Version: 1.68 Version: 1.68
Release: 1%{?dist} Release: 2%{?dist}
Summary: SQLite DBI Driver Summary: SQLite DBI Driver
# lib/DBD/SQLite.pm: GPL+ or Artistic # lib/DBD/SQLite.pm: GPL+ or Artistic
# LICENSE: GPL+ or Artistic # LICENSE: GPL+ or Artistic
@ -21,6 +21,9 @@ Patch0: perl-DBD-SQLite-bz543982.patch
Patch1: DBD-SQLite-1.62-Remove-bundled-source-extentions.patch Patch1: DBD-SQLite-1.62-Remove-bundled-source-extentions.patch
# Adapt tests to unbundled Test::FailWarnings # Adapt tests to unbundled Test::FailWarnings
Patch2: DBD-SQLite-1.64-Unbundle-Test-FailWarnings.patch Patch2: DBD-SQLite-1.64-Unbundle-Test-FailWarnings.patch
# Backport removal of sqlite_unicode deprecation warning
# https://github.com/DBD-SQLite/DBD-SQLite/commit/6e7986e
Patch3: 0001-Silence-the-deprecation-warning-of-sqlite_unicode-as.patch
# if sqlite >= 3.6.0 then # if sqlite >= 3.6.0 then
# perl-DBD-SQLite uses the external library # perl-DBD-SQLite uses the external library
# else # else
@ -86,6 +89,7 @@ SQLite.
%patch0 -p1 %patch0 -p1
%patch1 -p1 %patch1 -p1
%patch2 -p1 %patch2 -p1
%patch3 -p1
# Remove bundled sqlite libraries (BZ#1059154) # Remove bundled sqlite libraries (BZ#1059154)
# System libraries will be used # System libraries will be used
rm sqlite* rm sqlite*
@ -119,6 +123,9 @@ make test
%{_mandir}/man3/*.3pm* %{_mandir}/man3/*.3pm*
%changelog %changelog
* Thu Jul 29 2021 Adam Williamson <awilliam@redhat.com> - 1.68-2
- (backport) disable sqlite_unicode deprecation warning as it's widely used
* Thu Jul 22 2021 Jitka Plesnikova <jplesnik@redhat.com> - 1.68-1 * Thu Jul 22 2021 Jitka Plesnikova <jplesnik@redhat.com> - 1.68-1
- 1.68 bump - 1.68 bump

Loading…
Cancel
Save