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