From: Collin Funk Date: Sat, 13 Apr 2024 01:34:49 +0000 (-0700) Subject: gnulib-tool.py: Fix --copy-file directory creation. X-Git-Tag: v1.0~104 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=e25bb2729fb25294c82cf989628538ca763782ac;p=gnulib.git gnulib-tool.py: Fix --copy-file directory creation. Reported by Bruno Haible in * pygnulib/main.py (main): Make sure that destdir is set in the GLConfig object before copying files. --- diff --git a/ChangeLog b/ChangeLog index 8f5904281c..80679d0743 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2024-04-12 Collin Funk + + gnulib-tool.py: Fix --copy-file directory creation. + Reported by Bruno Haible in + + * pygnulib/main.py (main): Make sure that destdir is set in the GLConfig + object before copying files. + 2024-04-12 Bruno Haible gnulib-tool.py: Implement --add-import --with-*-tests correctly. diff --git a/gnulib-tool.py.TODO b/gnulib-tool.py.TODO index 88e92150f4..2db551d4e0 100644 --- a/gnulib-tool.py.TODO +++ b/gnulib-tool.py.TODO @@ -3,8 +3,6 @@ Bugs: - test-cache-2-*.sh test suite failures - - --copy-file creates wrong directory - https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00140.html - error message missing when gl_DOC_BASE missing https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00160.html diff --git a/pygnulib/main.py b/pygnulib/main.py index f654d5b109..4b64305049 100644 --- a/pygnulib/main.py +++ b/pygnulib/main.py @@ -1339,12 +1339,12 @@ def main() -> None: except FileExistsError: pass # Copy the file. + config.setDestDir(destdir) assistant = GLFileAssistant(config) tmpfile = assistant.tmpfilename(destpath) copyfile(lookedup, tmpfile) ensure_writable(tmpfile) assistant.setOriginal(srcpath) - assistant.config.setDestDir(destdir) assistant.setRewritten(destpath) if isfile(joinpath(destdir, destpath)): # The file already exists.