]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
localedef: Handle symbolic links when generating locale-archive
authorArjun Shankar <arjun@redhat.com>
Thu, 24 Feb 2022 20:43:09 +0000 (21:43 +0100)
committerArjun Shankar <arjun@redhat.com>
Thu, 3 Mar 2022 10:58:03 +0000 (11:58 +0100)
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

index f38e835c52e4a967ef9b546db8077d9e53694c94..d79278b6ed7340bfc3b606aa69977295256cb186 100644 (file)
@@ -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);