]> Savannah Git Hosting - gnulib.git/commitdiff
gnulib-tool.py: Don't allow path normalization to delete a variable.
authorCollin Funk <collin.funk1@gmail.com>
Sat, 6 Apr 2024 13:04:52 +0000 (06:04 -0700)
committerBruno Haible <bruno@clisp.org>
Sun, 7 Apr 2024 11:33:32 +0000 (13:33 +0200)
* pygnulib/GLModuleSystem.py
(GLModule.getAutomakeSnippet_Unconditional): Use os.path.join() on the
Makefile variable so it isn't deleted by a following '..' from
os.path.norm().

ChangeLog
pygnulib/GLModuleSystem.py

index 197b2fae762228b8963de4ef88604b5a5e4c5053..201eafa9b582c78fbd07d9648045bf30321060ee 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2024-04-07  Collin Funk  <collin.funk1@gmail.com>
+
+       gnulib-tool.py: Don't allow path normalization to delete a variable.
+       * pygnulib/GLModuleSystem.py
+       (GLModule.getAutomakeSnippet_Unconditional): Use os.path.join() on the
+       Makefile variable so it isn't deleted by a following '..' from
+       os.path.norm().
+
 2024-04-07  Collin Funk  <collin.funk1@gmail.com>
 
        gnulib-tool.py: Use auxdir as given by AC_CONFIG_AUX_DIR.
index 98a21c4696f84520e0c2c7ecbaedacec3e753c50..f8ff71383a90a745aaa492852140f273ce239241 100644 (file)
@@ -645,7 +645,7 @@ class GLModule:
                 buildaux_files = filter_filelist(constants.NL, all_files,
                                                  'build-aux/', '', 'build-aux/', '')
                 if buildaux_files != '':
-                    buildaux_files = [ joinpath('$(top_srcdir)', auxdir, filename)
+                    buildaux_files = [ os.path.join('$(top_srcdir)', joinpath(auxdir, filename))
                                        for filename in buildaux_files.split(constants.NL) ]
                     result += 'EXTRA_DIST += %s' % ' '.join(buildaux_files)
                     result += '\n\n'