]> code.ossystems Code Review - openembedded-core.git/commitdiff
apt: The C.UTF-8 locale is not portable
authorAdrian Bunk <bunk@stusta.de>
Wed, 13 May 2020 21:35:32 +0000 (00:35 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 15 May 2020 15:24:15 +0000 (16:24 +0100)
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/apt/apt.inc
meta/recipes-devtools/apt/apt/0001-The-C.UTF-8-locale-is-not-portable-use-std-locale-cl.patch [new file with mode: 0644]

index 13f5969f86acc147ff6b0f45f81a9c3a8dd39fa6..87d533782f88634cdd15985f54e30987f2165178 100644 (file)
@@ -17,6 +17,7 @@ SRC_URI = "https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/${BPN}/${P
            file://0001-environment.mak-musl-based-systems-can-generate-shar.patch \
            file://0001-apt-1.2.12-Fix-musl-build.patch \
            file://0001-Include-array.h-for-std-array.patch \
+           file://0001-The-C.UTF-8-locale-is-not-portable-use-std-locale-cl.patch \
            "
 SRC_URI[md5sum] = "d30eed9304e82ea8238c854b5c5a34d9"
 SRC_URI[sha256sum] = "03ded4f5e9b8d43ecec083704b2dcabf20c182ed382db9ac7251da0b0b038059"
diff --git a/meta/recipes-devtools/apt/apt/0001-The-C.UTF-8-locale-is-not-portable-use-std-locale-cl.patch b/meta/recipes-devtools/apt/apt/0001-The-C.UTF-8-locale-is-not-portable-use-std-locale-cl.patch
new file mode 100644 (file)
index 0000000..ce5c005
--- /dev/null
@@ -0,0 +1,27 @@
+From 7e8839731ae3fdf7502b91643aa6b252f6c5eaa6 Mon Sep 17 00:00:00 2001
+From: Adrian Bunk <bunk@stusta.de>
+Date: Thu, 14 May 2020 00:08:21 +0300
+Subject: The C.UTF-8 locale is not portable, use std::locale::classic()
+
+Upstream-Status: Inappropriate [Similar fix already in apt >= 1.3]
+Signed-off-by: Adrian Bunk <bunk@stusta.de>
+---
+ ftparchive/writer.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ftparchive/writer.cc b/ftparchive/writer.cc
+index 25963820a..6ad571d2a 100644
+--- a/ftparchive/writer.cc
++++ b/ftparchive/writer.cc
+@@ -984,7 +984,7 @@ ReleaseWriter::ReleaseWriter(FileFd * const GivenOutput, string const &/*DB*/) :
+    AddPatterns(_config->FindVector("APT::FTPArchive::Release::Patterns"));
+    time_t const now = time(NULL);
+-   auto const posix = std::locale("C.UTF-8");
++   auto const posix = std::locale::classic();
+    // FIXME: use TimeRFC1123 here? But that uses GMT to satisfy HTTP/1.1
+    std::ostringstream datestr;
+-- 
+2.20.1
+