summaryrefslogtreecommitdiff
path: root/localedef-Handle-symbolic-links-when-generating-loca.patch
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2024-08-03 06:28:41 +0000
committerCoprDistGit <infra@openeuler.org>2024-08-03 06:28:41 +0000
commitd20db0561a6a36f914fde030512503b114ef9a0c (patch)
treed4e5e3494d95c269a1cee6195f11bf3201bcadbf /localedef-Handle-symbolic-links-when-generating-loca.patch
parent016343d99b1b269d7246ef1e143d4b54914433d4 (diff)
Diffstat (limited to 'localedef-Handle-symbolic-links-when-generating-loca.patch')
-rw-r--r--localedef-Handle-symbolic-links-when-generating-loca.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/localedef-Handle-symbolic-links-when-generating-loca.patch b/localedef-Handle-symbolic-links-when-generating-loca.patch
new file mode 100644
index 0000000..a0e7825
--- /dev/null
+++ b/localedef-Handle-symbolic-links-when-generating-loca.patch
@@ -0,0 +1,33 @@
+From ea89d5bbd9e5e514b606045d909e6ab87d851c88 Mon Sep 17 00:00:00 2001
+From: Arjun Shankar <arjun@redhat.com>
+Date: Thu, 24 Feb 2022 21:43:09 +0100
+Subject: [PATCH] localedef: Handle symbolic links when generating
+ locale-archive
+
+Whenever locale data for any locale included symbolic links, localedef
+would throw the error "incomplete set of locale files" and exclude it
+from the generated locale archive. This commit fixes that.
+
+Co-authored-by: Florian Weimer <fweimer@redhat.com>
+
+Reviewed-by: Carlos O'Donell <carlos@redhat.com>
+---
+ locale/programs/locarchive.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/locale/programs/locarchive.c b/locale/programs/locarchive.c
+index 45408c2..eeb2fa6 100644
+--- a/locale/programs/locarchive.c
++++ b/locale/programs/locarchive.c
+@@ -1397,7 +1397,7 @@ add_locales_to_archive (size_t nlist, char *list[], bool replace)
+ {
+ char fullname[fnamelen + 2 * strlen (d->d_name) + 7];
+
+- if (d_type == DT_UNKNOWN)
++ if (d_type == DT_UNKNOWN || d_type == DT_LNK)
+ {
+ strcpy (stpcpy (stpcpy (fullname, fname), "/"),
+ d->d_name);
+--
+1.8.3.1
+