Re: Python './gnulib-tool --create-testdir --dir F' should quickly warn if F exists

2024-05-15 Thread Bruno Haible
Collin Funk wrote: > I've committed the attached patch. Looks good. Thanks. Bruno

Re: Python './gnulib-tool --create-testdir --dir F' should quickly warn if F exists

2024-05-14 Thread Collin Funk
On 5/14/24 2:24 AM, Bruno Haible wrote: > But the first line of this diagnostic looks strange, without an > indication where it comes from. Recall our conventions: > - For an error during option handling, prepend the absolute program name. > - For an error due to the contents of some files, pre

Re: Python './gnulib-tool --create-testdir --dir F' should quickly warn if F exists

2024-05-14 Thread Collin Funk
On 5/14/24 7:54 AM, Paul Eggert wrote: > I am still falling back on the shell implementation when I discover > gnulib-tool.py bugs or issues, and that's still happening to me (as recently > as yesterday). So Collin, if it's not too much trouble, please update > gnulib-tool.sh for this mkdir issu

Re: Python './gnulib-tool --create-testdir --dir F' should quickly warn if F exists

2024-05-14 Thread Paul Eggert
On 2024-05-14 02:24, Bruno Haible wrote: I can do the same in gnulib-tool.sh if you would like since it should be pretty easy there too. This is not needed. The Python implementation is already the default. We haven't heard from anyone who needs to run the shell implementation. I still need to

Re: Python './gnulib-tool --create-testdir --dir F' should quickly warn if F exists

2024-05-14 Thread Bruno Haible
Collin Funk wrote: > I've applied the attached patch. > ... > $ gnulib-tool --create-testdir --dir foo -h stdbit > not overwriting destination directory: foo > /home/collin/.local/src/gnulib/gnulib-tool.py: *** Stop. Thanks! But the first line of this diagnostic looks strange, without an

Re: Python './gnulib-tool --create-testdir --dir F' should quickly warn if F exists

2024-05-13 Thread Collin Funk
Hi Bruno, On 5/13/24 8:47 PM, Bruno Haible wrote: >> Perhaps both implementations should quickly exit in this situation, come >> to think of it. > > I agree. I've made the same mistake a number of times. There is no valid use > for continuing if $destdir already exists, since the call is guarante

Re: Python './gnulib-tool --create-testdir --dir F' should quickly warn if F exists

2024-05-13 Thread Bruno Haible
Paul Eggert wrote: > Perhaps both implementations should quickly exit in this situation, come > to think of it. I agree. I've made the same mistake a number of times. There is no valid use for continuing if $destdir already exists, since the call is guaranteed to overwrite configure.ac, Makefile.

Re: Python './gnulib-tool --create-testdir --dir F' should quickly warn if F exists

2024-05-13 Thread Collin Funk
On 5/13/24 7:45 PM, Paul Eggert wrote: > I messed up. However, the shell implementation of gnulib-tool diagnoses my > mistake right away, before going on its slow way: > > $ GNULIB_TOOL_IMPL=sh ./gnulib-tool --create-testdir --dir foo -h stdbit > mkdir: cannot create directory ‘foo’: File exi

Python './gnulib-tool --create-testdir --dir F' should quickly warn if F exists

2024-05-13 Thread Paul Eggert
If I run this command twice, by mistake: ./gnulib-tool --create-testdir --dir foo -h stdbit ./gnulib-tool --create-testdir --dir foo -h stdbit The second invocation eventually fails with: ... executing automake --add-missing --copy patching file build-aux/test-driver /home/eggert/src/gn