From e497e6fb54a56fa973f89239d9f2b9e2ad30c4d42a78d8e6afa12c0b788bda46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tina=20M=C3=BCller?= Date: Fri, 30 Jul 2021 07:59:12 +0000 Subject: [PATCH] Accepting request 909334 from home:tinita:branches:devel:languages:perl - Add patch silence_sqlite_unicode_deprecation_warning.patch See https://github.com/DBD-SQLite/DBD-SQLite/issues/87 OBS-URL: https://build.opensuse.org/request/show/909334 OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-DBD-SQLite?expand=0&rev=66 --- cpanspec.yml | 4 ++-- perl-DBD-SQLite.changes | 6 ++++++ perl-DBD-SQLite.spec | 3 ++- silence_sqlite_unicode_deprecation_warning.patch | 16 ++++++++++++++++ 4 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 silence_sqlite_unicode_deprecation_warning.patch diff --git a/cpanspec.yml b/cpanspec.yml index 9b320f5..54d7205 100644 --- a/cpanspec.yml +++ b/cpanspec.yml @@ -4,8 +4,8 @@ #sources: # - source1 # - source2 -#patches: -# foo.patch: -p1 +patches: + silence_sqlite_unicode_deprecation_warning.patch: -p1 # bar.patch: #preamble: |- # BuildRequires: gcc-c++ diff --git a/perl-DBD-SQLite.changes b/perl-DBD-SQLite.changes index c078f03..c7bda57 100644 --- a/perl-DBD-SQLite.changes +++ b/perl-DBD-SQLite.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Jul 30 07:51:14 UTC 2021 - Tina Müller + +- Add patch silence_sqlite_unicode_deprecation_warning.patch + See https://github.com/DBD-SQLite/DBD-SQLite/issues/87 + ------------------------------------------------------------------- Fri Jul 23 03:06:56 UTC 2021 - Tina Müller diff --git a/perl-DBD-SQLite.spec b/perl-DBD-SQLite.spec index d395419..005170d 100644 --- a/perl-DBD-SQLite.spec +++ b/perl-DBD-SQLite.spec @@ -25,6 +25,7 @@ License: Artistic-1.0 OR GPL-1.0-or-later URL: https://metacpan.org/release/%{cpan_name} Source0: https://cpan.metacpan.org/authors/id/I/IS/ISHIGAKI/%{cpan_name}-%{version}.tar.gz Source1: cpanspec.yml +Patch0: silence_sqlite_unicode_deprecation_warning.patch BuildRequires: perl BuildRequires: perl-macros BuildRequires: perl(DBI) >= 1.57 @@ -70,7 +71,7 @@ currently many statement attributes are not implemented or are limited by the typeless nature of the SQLite database. %prep -%autosetup -n %{cpan_name}-%{version} +%autosetup -n %{cpan_name}-%{version} -p1 %build perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" diff --git a/silence_sqlite_unicode_deprecation_warning.patch b/silence_sqlite_unicode_deprecation_warning.patch new file mode 100644 index 0000000..3f596f8 --- /dev/null +++ b/silence_sqlite_unicode_deprecation_warning.patch @@ -0,0 +1,16 @@ +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;