bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gnulib-tool.py: Fix output of 'po/LINGUAS'.


From: Collin Funk
Subject: gnulib-tool.py: Fix output of 'po/LINGUAS'.
Date: Sat, 30 Mar 2024 22:48:19 -0700
User-agent: Mozilla Thunderbird

Hi Bruno,

With all of the updates to gnulib-tool.py it is very easy to see why
GNU Bison fails to build. This is the only diff shown between
gnulib-tool.py and gnulib-tool.sh after running ./bootstrap:

--- a/bison-python/gnulib-po/LINGUAS
+++ b/bison-shell/gnulib-po/LINGUAS
@@ -1,18 +1,4 @@
 # Set of available languages.
-.gitignore
-Makevars.template
-Rules-quot
-boldquot.sed
-en@boldquot.header
-en@quot.header
-insert-header.sin
-quot.sed
-Makefile.in.in~
-Makefile.in.in
-remove-potcdate.sin~
-remove-potcdate.sin
-Makevars
-POTFILES.in
 af
 be
 bg

Here is the very simple fix:

diff --git a/pygnulib/GLImport.py b/pygnulib/GLImport.py
index c3a7597d02..1fc43bfdff 100644
--- a/pygnulib/GLImport.py
+++ b/pygnulib/GLImport.py
@@ -1241,7 +1241,8 @@ AC_DEFUN([%s_FILE_LIST], [\n''' % macro_prefix
                 tmpfile = self.assistant.tmpfilename(basename)
                 data = '# Set of available languages.\n'
                 files = [ constants.subend('.po', '', file)
-                          for file in os.listdir(joinpath(destdir, pobase)) ]
+                          for file in os.listdir(joinpath(destdir, pobase))
+                          if file.endswith('.po') ]
                 data += lines_to_multiline(files)
                 with codecs.open(tmpfile, 'wb', 'UTF-8') as file:
                     file.write(data)

And the corresponding section in gnulib-tool.sh, line 5847:

      func_dest_tmpfilename $pobase/LINGUAS
      (cd "$destdir"/$pobase \
       && { echo '# Set of available languages.'
            LC_ALL=C ls -1 *.po | sed -e 's,\.po$,,'
          }
      ) > "$tmpfile"

Collin

Attachment: 0001-gnulib-tool.py-Fix-output-of-po-LINGUAS.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]