Your message dated Tue, 6 Jul 2021 23:34:42 +0200
with message-id <[email protected]>
and subject line Re: Bug#990511: unblock: kodi/2:19.1+dfsg2-2
has caused the Debian Bug report #990511,
regarding unblock: kodi/2:19.1+dfsg2-2
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
990511: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=990511
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
User: [email protected]
Usertags: unblock
X-Debbugs-Cc: [email protected]

Please unblock package kodi

[ Reason ]

Targeted bug fix for #989814

[ Impact ]

Turkish users get Kodi unusable without it

[ Tests ]

See related Debian bug and https://github.com/xbmc/xbmc/issues/19883

[ Risks ]

Change is trivial and approved by upstream

[ Checklist ]
  [x] all changes are documented in the d/changelog
  [x] I reviewed all changes and I approve them
  [x] attach debdiff against the package in testing

[ Other info ]

unblock kodi/2:19.1+dfsg2-2
diff -Nru kodi-19.1+dfsg2/debian/changelog kodi-19.1+dfsg2/debian/changelog
--- kodi-19.1+dfsg2/debian/changelog    2021-06-07 14:42:08.000000000 +0000
+++ kodi-19.1+dfsg2/debian/changelog    2021-06-24 20:44:30.000000000 +0000
@@ -1,3 +1,9 @@
+kodi (2:19.1+dfsg2-2) unstable; urgency=medium
+
+  * Add runtime locale test and fallback (Closes: #989814)
+
+ -- Vasyl Gello <[email protected]>  Thu, 24 Jun 2021 20:44:30 +0000
+
 kodi (2:19.1+dfsg2-1) unstable; urgency=medium
 
   * New upstream version 19.1+dfsg2
diff -Nru kodi-19.1+dfsg2/debian/patches/kodi/0022-Workaround-989814.patch 
kodi-19.1+dfsg2/debian/patches/kodi/0022-Workaround-989814.patch
--- kodi-19.1+dfsg2/debian/patches/kodi/0022-Workaround-989814.patch    
1970-01-01 00:00:00.000000000 +0000
+++ kodi-19.1+dfsg2/debian/patches/kodi/0022-Workaround-989814.patch    
2021-06-24 20:44:30.000000000 +0000
@@ -0,0 +1,67 @@
+From 8b8e97dbec5c6268d1b81eb7799cfc945ca9520e Mon Sep 17 00:00:00 2001
+From: Vasyl Gello <[email protected]>
+Date: Fri, 25 Jun 2021 01:37:02 +0000
+Subject: [PATCH 1/2] Check if applied locale correctly lowers chars and
+ fallback
+
+.. to default region if it does not.
+
+Fixes #19883.
+
+Signed-off-by: Vasyl Gello <[email protected]>
+---
+ xbmc/LangInfo.cpp | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/xbmc/LangInfo.cpp b/xbmc/LangInfo.cpp
+index 24f0419cfe..ace72e1ffe 100644
+--- a/xbmc/LangInfo.cpp
++++ b/xbmc/LangInfo.cpp
+@@ -981,6 +981,16 @@ void CLangInfo::SetCurrentRegion(const std::string& 
strName)
+ 
+   m_currentRegion->SetGlobalLocale();
+ 
++  // Check if locale is not affected by #19883
++  int test19883 = std::tolower('i') - std::tolower('I');
++  if (test19883 != 0)
++  {
++    CLog::Log(LOGWARNING, "region '{}' is affected by #19883 - falling back 
to default region '{}'",
++              m_currentRegion->m_strName, m_defaultRegion.m_strName);
++    m_currentRegion = &m_defaultRegion;
++    m_currentRegion->SetGlobalLocale();
++  }
++
+   const std::shared_ptr<CSettings> settings = 
CServiceBroker::GetSettingsComponent()->GetSettings();
+   if (settings->GetString(CSettings::SETTING_LOCALE_SHORTDATEFORMAT) == 
SETTING_REGIONAL_DEFAULT)
+     SetShortDateFormat(m_currentRegion->m_strDateFormatShort);
+-- 
+2.32.0.rc0
+
+
+From 114ee13138389c96a759d6e5b73717093dd4030d Mon Sep 17 00:00:00 2001
+From: Vasyl Gello <[email protected]>
+Date: Sun, 27 Jun 2021 19:31:39 +0000
+Subject: [PATCH 2/2] kodi.sh.in: Unset LC_{ALL,CTYPE}, LANG
+
+Signed-off-by: Vasyl Gello <[email protected]>
+---
+ tools/Linux/kodi.sh.in | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/tools/Linux/kodi.sh.in b/tools/Linux/kodi.sh.in
+index 108c0b007b..29d17d2c0f 100644
+--- a/tools/Linux/kodi.sh.in
++++ b/tools/Linux/kodi.sh.in
+@@ -171,6 +171,9 @@ if command_exists gdb; then
+   fi
+ fi
+ 
++# Unset CTYPE, LANG and ALL - see issue #19883
++unset LC_CTYPE LC_ALL LANG
++
+ LOOP=1
+ while [ $(( $LOOP )) = "1" ]
+ do
+-- 
+2.32.0.rc0
+
diff -Nru kodi-19.1+dfsg2/debian/patches/series 
kodi-19.1+dfsg2/debian/patches/series
--- kodi-19.1+dfsg2/debian/patches/series       2021-06-07 14:42:08.000000000 
+0000
+++ kodi-19.1+dfsg2/debian/patches/series       2021-06-24 20:44:30.000000000 
+0000
@@ -19,6 +19,7 @@
 kodi/0019-Disable-GetCPUFrequency-test.patch
 kodi/0020-Fix-C++-example-includes.patch
 kodi/0021-Detect-and-honor-big-endian-arch.patch
+kodi/0022-Workaround-989814.patch
 libdvdnav/0001-xbmc-dvdnav-allow-get-set-vm-state.patch
 libdvdnav/0002-xbmc-dvdnav-expose-dvdnav_get_vm-dvdnav_get_button_i.patch
 libdvdnav/0003-xbmc-dvdnav-detection-of-dvd-name.patch

--- End Message ---
--- Begin Message ---
On 2021-07-02 09:35:21 +0000, Vasyl Gello wrote:
> >C++ has an overloaded version of tolower that takes a locale:
> >https://en.cppreference.com/w/cpp/locale/tolower
> 
> Good find, thanks! Still, what do you think about this concern:
> 
> > but to separate "culture-dependent" and "ordinal" comparisons, one needs to 
> > overhaul half of Kodi.
> > And this would make the fix unfit for 19.x branch as the regressions would 
> > be just as severe as they could be with CDateTime PR.
> 
> I dont think spending several weeks to isolate all places that need C-locale 
> comparison from those implementing language-specific processing (amd testing 
> all possible regressions!) is worth for 19.x.

Locale handling in kodi seems to be a mess. This doesn't make it any
worse, so aged to 7 days.

Cheers

> -- 
> Vasyl Gello
> ==================================================
> Certified SolidWorks Expert
> 
> Mob.:+380 (98) 465 66 77
> 
> E-Mail: [email protected]
> 
> Skype: vasek.gello
> ==================================================
> 호랑이는 죽어서 가죽을 남기고 사람은 죽어서 이름을 남긴다

-- 
Sebastian Ramacher

Attachment: signature.asc
Description: PGP signature


--- End Message ---

Reply via email to