08c3a6
commit ea89d5bbd9e5e514b606045d909e6ab87d851c88
08c3a6
Author: Arjun Shankar <arjun@redhat.com>
08c3a6
Date:   Thu Feb 24 21:43:09 2022 +0100
08c3a6
08c3a6
    localedef: Handle symbolic links when generating locale-archive
08c3a6
    
08c3a6
    Whenever locale data for any locale included symbolic links, localedef
08c3a6
    would throw the error "incomplete set of locale files" and exclude it
08c3a6
    from the generated locale archive.  This commit fixes that.
08c3a6
    
08c3a6
    Co-authored-by: Florian Weimer <fweimer@redhat.com>
08c3a6
    
08c3a6
    Reviewed-by: Carlos O'Donell <carlos@redhat.com>
08c3a6
08c3a6
diff --git a/locale/programs/locarchive.c b/locale/programs/locarchive.c
08c3a6
index f38e835c52e4a967..d79278b6ed7340bf 100644
08c3a6
--- a/locale/programs/locarchive.c
08c3a6
+++ b/locale/programs/locarchive.c
08c3a6
@@ -1391,7 +1391,7 @@ add_locales_to_archive (size_t nlist, char *list[], bool replace)
08c3a6
 		    {
08c3a6
 		      char fullname[fnamelen + 2 * strlen (d->d_name) + 7];
08c3a6
 
08c3a6
-		      if (d_type == DT_UNKNOWN)
08c3a6
+		      if (d_type == DT_UNKNOWN || d_type == DT_LNK)
08c3a6
 			{
08c3a6
 			  strcpy (stpcpy (stpcpy (fullname, fname), "/"),
08c3a6
 				  d->d_name);