public inbox for libc-stable@sourceware.org
 help / color / mirror / Atom feed
* [COMMITTED 2.34] localedef: Handle symbolic links when generating locale-archive
@ 2022-03-03 11:39 Arjun Shankar
  0 siblings, 0 replies; only message in thread
From: Arjun Shankar @ 2022-03-03 11:39 UTC (permalink / raw)
  To: libc-stable

[-- Attachment #1: Type: text/plain, Size: 373 bytes --]

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>
(cherry picked from commit ea89d5bbd9e5e514b606045d909e6ab87d851c88)

[-- Attachment #2: glibc-2.34-localedef-handle-symlinks.patch --]
[-- Type: text/x-patch, Size: 1215 bytes --]

From 852361b5a32fafb1aafb6467c7c567063fd99d44 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>
(cherry picked from commit ea89d5bbd9e5e514b606045d909e6ab87d851c88)
---
 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 f38e835c52..d79278b6ed 100644
--- a/locale/programs/locarchive.c
+++ b/locale/programs/locarchive.c
@@ -1391,7 +1391,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);
-- 
2.34.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-03-03 11:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-03 11:39 [COMMITTED 2.34] localedef: Handle symbolic links when generating locale-archive Arjun Shankar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).