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