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