public inbox for libc-stable@sourceware.org
 help / color / mirror / Atom feed
From: Arjun Shankar <arjun@redhat.com>
To: libc-stable@sourceware.org
Subject: [COMMITTED 2.34] localedef: Handle symbolic links when generating locale-archive
Date: Thu, 3 Mar 2022 12:39:47 +0100	[thread overview]
Message-ID: <CAG_osaYWLU4-YHPcMBhaxH=nb=ATQ16LMEQ9Va8bUya3bctUNg@mail.gmail.com> (raw)

[-- 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


                 reply	other threads:[~2022-03-03 11:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAG_osaYWLU4-YHPcMBhaxH=nb=ATQ16LMEQ9Va8bUya3bctUNg@mail.gmail.com' \
    --to=arjun@redhat.com \
    --cc=libc-stable@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).