[PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 55.

2024-03-11 Thread Collin Funk
st-shell and checked with and without --libtool since that affects the output of a change in GLEmiter.initmacro_end. CollinFrom 5afda4bcd2671f6c62fb5d067c58d398123830f0 Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Mon, 11 Mar 2024 18:50:28 -0700 Subject: [PATCH] gnulib-tool.py: Follow gnulib-

Re: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 55.

2024-03-12 Thread Collin Funk
Hi Bruno, On 3/12/24 9:52 AM, Bruno Haible wrote: > It works well in this case. But it becomes hairy when, in the mixed > autoconf/shell code that is emitted, there is a shell variable reference > ${foo} > because Python will interpret this as a reference to the Python variable > foo. Fortunatel

Re: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 55.

2024-03-12 Thread Collin Funk
Hey Bruno, On 3/12/24 10:07 AM, Collin Funk wrote: > Yeah, I can see that becoming an issue. Some areas the backslashes get > confusing as well. I had to run the test case a few times to convince > myself I got it correct... Well, that is a bit embarrassing. It looks like I spoke

[PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 56.

2024-03-12 Thread Collin Funk
test-python/configure.ac test-shell/configure.ac cd test-python gnulib-tool.py --import --with-tests fts > stdout cd .. cd test-shell gnulib-tool --import --with-tests fts > stdout cd .. git diff --no-index test-python test-shell CollinFrom 8c18958449689f7bcd82b172e535d9830f90451a Mon Sep 17

GPL comma and semicolon disagreement

2024-03-13 Thread Collin Funk
In gnulib-tool.py.TODO there is the following commit: commit 87e6634b28df65084321fed22f60d114a0931d21 Author: Bernhard Voelker Date: Tue Jan 4 00:16:50 2022 +0100 license: fix GPLv3 texts to use a comma instead of semicolon. See: https://www.gnu.org/licenses/gpl-3.0.html#howto Run

Re: GPL comma and semicolon disagreement

2024-03-13 Thread Collin Funk
Hi Bruno, On 3/13/24 5:55 AM, Bruno Haible wrote: > Yes, you can write to bug-standards. Be sure to include the history, > from . Done, thanks. I'll just remove that commit from gnulib-tool.py.TODO next time I submit a patch. C

[PATCH] sig2str: Add tests.

2024-03-13 Thread Collin Funk
40141 Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Wed, 13 Mar 2024 12:17:41 -0700 Subject: [PATCH] sig2str: Add tests. * modules/sig2str-tests: New file. * tests/test-sig2str.c: New file. --- ChangeLog | 6 modules/sig2str-tests | 11 tests/test-sig2str.c

Re: [PATCH] sig2str: Add tests.

2024-03-13 Thread Collin Funk
ted from git status. Your reasoning makes sense though. [1] https://git.savannah.gnu.org/cgit/gnulib/maint-tools.git/tree/platforms/test-environments.txt#n37 CollinFrom ba4402808278b7741ed0e4a208fbabc0fc8e1a96 Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Wed, 13 Mar 2024 12:17:41 -0700 Subject: [PATC

[PATCH] gnulib-tool.py: Fix write failure due to bad sourcebase.

2024-03-13 Thread Collin Funk
a few whitespace differences, and then a few lines that still need to be fixed. Not looking too bad though. CollinFrom c756cb0e6fbb73a6d9cd19339fbd846cd05d3d40 Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Wed, 13 Mar 2024 19:21:44 -0700 Subject: [PATCH] gnulib-tool.py: Fix write failure due

Re: [PATCH] gnulib-tool.py: Fix write failure due to bad sourcebase.

2024-03-14 Thread Collin Funk
Hi Bruno, On 3/14/24 7:38 AM, Bruno Haible wrote: > This patch looks better than the previous one, that added a > setSourceBase('lib') invocation. Applied. Thanks! Yes, that was more just me trying to explain the cause of the issue. I didn't have a good solution at the time. This patch was based

Re: planning for beta-testing gnulib-tool.py

2024-03-14 Thread Collin Funk
Hi Bruno, On 3/10/24 8:59 AM, Bruno Haible wrote: > 4) There is a list of packages that use gnulib, in the file users.txt. >We can pick, say, the 10 most important or most active GNU packages among >these, and repeat step 3) for each of them. I am still working on gnulib-tool.py.TODO and

Re: gnulib-tool: Obey environment variable GNULIB_TOOL_IMPL

2024-03-14 Thread Collin Funk
Hi Bruno, On 3/14/24 2:22 PM, Bruno Haible wrote: > OK. If you start to go into this direction, it is time for me to > implement the GNULIB_TOOL_IMPL=sh+py option. Done through the patch below. Oops, I didn't mean to rush you... I was just changing a few lines of the boostrap script by hand. This

[PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 57.

2024-03-14 Thread Collin Funk
fma pow trim > test-shell 2>&1 git diff --no-index test-python test-shell CollinFrom 6847254ed7ed967725f90755962034af10147996 Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Thu, 14 Mar 2024 18:41:05 -0700 Subject: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 57. Follow gn

Re: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 57.

2024-03-14 Thread Collin Funk
Hi Bruno, On 3/14/24 7:23 PM, Bruno Haible wrote: > Thanks! Applied, with a tiny comment change: I removed the dollars from > # Remove $handledmodules from $inmodules. Oops, in the commit before I added some comments directly from gnulib-tool to main.py as well. Feel free to change them if you'

[PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 58.

2024-03-15 Thread Collin Funk
else: # last_option is --hardlink or equivalent. symlink = False And something similar for the --local-* variants. I think that covers all of the strange hackery for this patch. [1] https://docs.python.org/3/library/argparse.html CollinFrom 3eeea5b376c5e0eceb5378bbbc3876ddbfbdca7c

Re: gnulib-tool: Obey environment variable GNULIB_TOOL_IMPL

2024-03-15 Thread Collin Funk
Hi Simon, On 3/15/24 7:30 AM, Simon Josefsson wrote: > Wow it is very much faster! \o/ That result is interesting. I wonder what part takes the shell script so long. Maybe I'll use gnulib-tool as an excuse to expirement with perf, dtrace, etc. > OATH Toolkit fails with sh+py though... Yes, Bru

Re: planning for beta-testing gnulib-tool.py

2024-03-15 Thread Collin Funk
Hi Darshit, On 3/14/24 12:12 PM, Darshit Shah wrote: > I'm following the development of gnulib-tool.py pretty closely. Wget and > Wget2 have tried to use the Python version multiple times in the past with > varying levels of success. I am enjoying working on it, so hopefully this time will be

Re: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 58.

2024-03-15 Thread Collin Funk
tool.py.TODO | 31 +- pygnulib/GLConfig.py | 93 +--- pygnulib/GLFileSystem.py | 63 +-- pygnulib/GLInfo.py | 4 ++ pygnulib/GLTestDir.py| 4 +- pygnulib/classes.py | 4 +- pygnulib/constants.py| 20 ++

Re: debugging gnulib-tool.py

2024-03-15 Thread Collin Funk
On 3/15/24 5:27 PM, Bruno Haible wrote: > * Choice: It seems that PyCharm, VSCode, Spyder, Eclipse with PyDev are the > most prominent candidates. I used PyCharm for a course I took in college since the professor wanted us to. I remember liking it. It seems that the source of the PyCharm Communi

Re: gnulib-tool: Obey environment variable GNULIB_TOOL_IMPL

2024-03-16 Thread Collin Funk
Hi Bruno, On 3/16/24 4:46 AM, Bruno Haible wrote: > Here the Python output is prettier. So, here is a patch to align > gnulib-tool.sh's output with gnulib-tool.py. It's a leftover from this patch, > which did not cover the --local-dir options: I realized that I accidental made the Python output p

Re: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 58.

2024-03-16 Thread Collin Funk
Hi Bruno, On 3/16/24 6:14 AM, Bruno Haible wrote: > Oh, I had not seen that the use of 'classes.' was so inconsistent. > Haven't made up my mind yet, regarding when 'classes.' should be used or not. This is somewhat related since it deals with imports, but is there a reason why we don't just impo

Re: gnulib-tool.py: Coding style: Avoid bool()

2024-03-16 Thread Collin Funk
+result = not self.isTests() return result CollinFrom efe6d445b71ae8aa998dbac0eb6fda61756178f2 Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Sat, 16 Mar 2024 07:20:39 -0700 Subject: [PATCH] gnulib-tool.py: Coding style: Avoid not(). * pygnulib/GLModuleSystem.py (isNonTests):

Re: debugging gnulib-tool.py

2024-03-16 Thread Collin Funk
On 3/15/24 5:27 PM, Bruno Haible wrote: > * Download and configuration: > - Eclipse IDE from https://www.eclipse.org/downloads/packages/ > (either the build for Java or for C/C++ should work fine). I am in the process of setting this up at the moment to experiment. I figured that I should me

Re: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 58.

2024-03-16 Thread Collin Funk
From experimenting, I've confirmed that calling an invalid program will throw 'FileNotFoundError'. Other errors should fail loudly so they are not ignored. [1] https://docs.python.org/3/library/subprocess.html#exceptions [2] https://docs.python.org/3/library/exceptions.html#os-exceptions C

gnulib-tool.py: Follow gnulib-tool changes, part 59.

2024-03-16 Thread Collin Funk
onfig.h.in'. I've left that function as-is for now, but I will probably get around to cleaning it & it's callers eventually. [1] https://docs.python.org/3/library/pathlib.html#pathlib.Path.touch CollinFrom cf2c30d09f7210b1e42bbae3ae239c6e9c0c61c0 Mon Sep 17 00:00:00 2001 Fro

[PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 60.

2024-03-16 Thread Collin Funk
of Automake conditionals on conditional dependencies. So, once that is done things should work properly. Hopefully. Collin >From 4baa360e2d7d3ddb2584f4e7a45a97e0e9c293fb Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Sat, 16 Mar 2024 18:49:35 -0700 Subject: [PATCH] gnulib-tool.py: Follow gnu

[PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 61.

2024-03-16 Thread Collin Funk
after this patch: $ ls -l *.diff -rw-r--r--. 1 collin collin 1745735 Mar 16 20:00 0001-pre60.diff -rw-r--r--. 1 collin collin 1745735 Mar 16 20:03 0002-pre61.diff -rw-r--r--. 1 collin collin 22564 Mar 16 20:06 0003-post61.diff Collin >From 3694bbf770e161fc20b89d910a639b579ff06db7 Mon Sep 17 00

[PATCH] gnulib-tool.py: Don't try to remove files that don't exist.

2024-03-16 Thread Collin Funk
) The corresponding lines in gnulib-tool.sh use 'rm -f "$tmpfile"' to silence warnings when files do not exist. Collin >From 2861a2b7295bca64b0560c59ffd8b8b959693c62 Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Sat, 16 Mar 2024 20:43:00 -0700 Subject: [PATCH

[PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 62.

2024-03-17 Thread Collin Funk
Pretty small patch. Just adds ensure_writable after copying files. Collin >From 224c3c910f88d22b825ad93e189ef6102487ad5a Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Sun, 17 Mar 2024 10:03:54 -0700 Subject: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 62. Follow gnulib-t

Re: gnulib-tool: Add undocumented option --gnulib-dir

2024-03-17 Thread Collin Funk
Hi Bruno, Bruno Haible writes: > The gnulib-tool test suite will need this option, in order to use the > newest gnulib-tool with a frozen-in-time set of gnulib modules. By this do you mean if a project has a old gnulib git submodule? I think I ran into this with GNU Bison for example. It hasn't

Re: gnulib-tool: Add undocumented option --gnulib-dir

2024-03-17 Thread Collin Funk
Bruno Haible writes: > No, what I mean is just to take a snapshot. For the reasons explained in > https://lists.gnu.org/archive/html/bug-gnulib/2024-03/msg00109.html . Ah, I see. I misunderstood the "frozen-in-time set of gnulib modules", but that message explains it. Thanks. Collin

Add set_* functions to stat-time?

2024-03-17 Thread Collin Funk
Hi Paul, Not sure if this is best suited for a tar mailing list, but since you wrote stat-time and are a tar maintainer I figured you could help. But when following Bruno's advice for downloading Eclipse to work on gnulib-tool.py I ran into this: $ tar -xf eclipse-inst-jre-linux64.tar.gz gtar:

[PATCH] gnulib-tool.py: Don't print extra newlines.

2024-03-17 Thread Collin Funk
ulib module warnings +ifeq (,$(OMIT_GNULIB_MODULE_warnings)) + +endif +## end gnulib module warnings + ## begin gnulib module xalloc-oversized ifeq (,$(OMIT_GNULIB_MODULE_xalloc-oversized)) CollinFrom c640f330a235515ca785e7ae3ab538dcfce16b64 Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Su

[PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 63.

2024-03-17 Thread Collin Funk
bit strange, but that is my reasoning for it CollinFrom 6b1cd6387931af81388574826ba38fe466da7233 Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Sun, 17 Mar 2024 14:51:18 -0700 Subject: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 63. Follow gnulib-tool change 2020-12-28 Bruno Hai

Re: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 63.

2024-03-17 Thread Collin Funk
27;\n', where the goal was to remove the + '\n' but I removed it. Good catch. I've attached the updated patch. CollinFrom cb06a3a076e67c146ffdbda7fbe2a14c048bca91 Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Sun, 17 Mar 2024 14:51:18 -0700 Subject: [PATCH] gnulib-tool.py: Fo

Re: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 63.

2024-03-17 Thread Collin Funk
Hi Bruno, On 3/17/24 4:49 PM, Bruno Haible wrote: > It is not good if, each time we deal with a list of lines, we have to give > extra thought to the case of 0 lines. This is only a recipe for > inconsistencies. Yes, this change looks much better. Having 'if len(lines) > 0: ...' everwhere looks

Re: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 63.

2024-03-17 Thread Collin Funk
On 3/17/24 5:57 PM, Bruno Haible wrote: > Yes, we can do that. In the commit today, however, I wanted to close one issue > without possibly opening another one. No worries, there is no rush. > It is also worth testing various editors (gedit, kate, emacs, eclipse, > PyCharm, etc.): Where do they p

Re: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 63.

2024-03-17 Thread Collin Funk
On 3/17/24 6:31 PM, Bruno Haible wrote: > Well, one can also see it the other way around: With single quotes > everywhere, it's more consistent. LOL, fair enough. > Feel free to find more arguments for one or the other. I'm undecided, > but it would be a major change, so one should think about it

[PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 64.

2024-03-17 Thread Collin Funk
following in Python: 1. GLModule.isTests() 2. GLModule.isNonTests() 3. GLModule.getName().endswith('-tests') I think I found all of them. Luckily there are only a few 'Applicability: all' modules, so it should be easy to tell if this issue pops up again. CollinFrom 059a70104a83ad0339

Re: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 64.

2024-03-18 Thread Collin Funk
Hi Bruno, On 3/18/24 4:05 AM, Bruno Haible wrote: > Thanks a lot. Yes, things get tricky if, after after some refactoring, the > function names don't fit the semantics any more. Yeah, how we have it now should match gnulib-tool.sh, but the naming is a bit misleading. I'll keep it in the back of m

[PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 65.

2024-03-18 Thread Collin Funk
the backslashes correctly: pattern = re.compile(r'^.*AC_CONFIG_MACRO_DIRS?\([\[ ]*([^\]"\$`\\\)]*).*$', re.MULTILINE) print(pattern.findall('''AC_CONFIG_MACRO_DIR([dir1])dnl AC_CONFIG_MACRO_DIRS([dir2] ) AC_CONFIG_MACRO_DIR([dir3] )''')) ['dir1', 'dir2

[PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 66.

2024-03-18 Thread Collin Funk
just make it harder to cross reference if someone new wants to mess with gnulib-tool.py. :) CollinFrom cab20e9eafaa717132c4c085a88cb86cf66a6efb Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Mon, 18 Mar 2024 16:26:34 -0700 Subject: [PATCH 2/2] gnulib-tool.py: Follow gnulib-tool changes, part 6

Re: Problems with directory trees "confdir-14B---" and "confdir3"

2024-03-18 Thread Collin Funk
On 3/18/24 5:11 PM, Peter Dyballa wrote: > Right now I am on PPC Leopard, Mac OS X 10.5.8. No ktrace/kdump here, only > dtrace. > > Do you know how to invoke dtrace? (Did it last time presumingly decades ago > on Solaris…) >From what I read from the previous messages, we only care about the ord

[PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 67.

2024-03-18 Thread Collin Funk
ssistant.tmpfilename(joinpath(pobase, file)) but the removal of the temporary file is done inside of the parent, outside of the loop. Therefore only the second temporary file would be deleted. Collin From 3d500b2a124193e73f32a6c40d9e39b248d2a0da Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Mon,

[PATCH] gnulib-tool.py: Don't emit empty Automake snippets.

2024-03-18 Thread Collin Funk
gnulib.mk.in @@ -3296,7 +3296,9 @@ ifneq (,$(GL_COND_OBJ_STDIO_WRITE_CONDITION)) libgnu_a_SOURCES += stdio-write.c endif -EXTRA_DIST += stdio.in.h +EXTRA_DIST += stdio-read.c stdio.in.h + +EXTRA_libgnu_a_SOURCES += stdio-read.c endif ## end gnulib module stdio CollinFrom 2a5a782422d982e9552587

Re: [PATCH] gnulib-tool.py: Don't emit empty Automake snippets.

2024-03-19 Thread Collin Funk
Hi Bruno, Bruno Haible writes: > ... which tests whether the combination of the two snippets contains some > character that is not newline, not space, and not tab. Oops... That is embarrassing. I wrote that right before going to sleep. I think I ended up imagining it was: grep '^[^

Re: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 67.

2024-03-19 Thread Collin Funk
Bruno Haible writes: > In common talk, "I made an error" and "I made a mistake" are synonymous. > But when talking about a program, there's a difference between "an error" > and "a mistake". I agree, that would be a more accurate description. I didn't put too much thought into it. I was in "commo

Re: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 67.

2024-03-19 Thread Collin Funk
Hi Bruno, On 3/19/24 8:47 AM, Bruno Haible wrote: > Tom Dickey's packages (GNU ncurses, lynx, etc.) and GNU clisp still use > configure.in. Interesting, good to know. It seems working on gnulib-tool is a good way for me to explore all the GNU packages. Speaking of which, I was working on '--auto

[PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 68.

2024-03-19 Thread Collin Funk
on GNU Bison, but 'make all' fails: make[4]: Leaving directory '/home/collin/.local/src/bison/gnulib-po' File POTFILES.in.po does not exist. If you are a translator, you can create it through 'msginit'. Just another item on the list of things to fix. :) CollinFrom c4

Re: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 68.

2024-03-19 Thread Collin Funk
++ b/ChangeLog @@ -1,3 +1,29 @@ +2024-03-19 Collin Funk + + gnulib-tool.py: Follow gnulib-tool changes, part 68. + Follow gnulib-tool change + 2022-07-31 Akim Demaille + gnulib-tool: add support for --automake-subdir-tests + * pygnulib/main.py (main): Add support for --automake-subdir-tests.

Re: a test suite for gnulib-tool

2024-03-19 Thread Collin Funk
Hi Bruno, On 3/19/24 4:33 PM, Bruno Haible wrote: > In > I outlined how a test suite for gnulib-tool could look like. Thanks! I wanted to get started on something but got caught up with working on gnulib-tool.py itself. Your te

gnulib-tool --extract-filelist whitespace diff fix

2024-03-19 Thread Collin Funk
When looking at the gnulib-tool test suite I noticed that the '--extract-filelist' tests fail because of this whitespace difference: $ env GNULIB_TOOL_IMPL=sh gnulib-tool --extract-filelist warnings m4/warnings.m4 m4/00gnulib.m4 m4/zzgnulib.m4 m4/gnulib-common.m4 $ env GNULIB_TOOL_IMPL=py gnulib

Re: [PATCH] gnulib-tool.py: Don't emit empty Automake snippets.

2024-03-20 Thread Collin Funk
27;': CollinFrom 71d0dca244a2e45ae50d95ea60f8fa8946888f8a Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Wed, 20 Mar 2024 00:57:50 -0700 Subject: [PATCH] gnulib-tool.py: Don't print empty Automake snippets. * pygnulib/GLEmiter.py (GLEmiter.lib_Makefile_am) (GLEmiter.tests_Makef

[PATCH] gnulib-tool.py: Prefer str.splitlines() over str.split('\n').

2024-03-20 Thread Collin Funk
#x27;] print('1\n2\r3\r\n4\n'.splitlines()) ['1', '2', '3', '4'] # Or more commonly, empty strings print(''.split('\n')) [''] print(''.splitlines()) [] This should help reduce the amount of unexpected newlines

Re: [PATCH] gnulib-tool.py: Prefer str.splitlines() over str.split('\n').

2024-03-20 Thread Collin Funk
Hi Bruno, On 3/20/24 3:58 AM, Bruno Haible wrote: > * If an Automake snippet has a blank line, we want that blank line to be > preserved in the generated Makefile.am, not eliminated. Ah, okay I see. I agree that it is best to preserve whitespace here. I didn't see any '\v', '\f', etc. in the mo

[PATCH] gnulib-tool.py: Fix unconditional Automake snippets for non-tests.

2024-03-20 Thread Collin Funk
b270840ed6fc3b0c8810589bab5833be Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Wed, 20 Mar 2024 11:57:19 -0700 Subject: [PATCH] gnulib-tool.py: Fix unconditional Automake snippets for non-tests. * pygnulib/GLModuleSystem.py (GLModule.getAutomakeSnippet_Unconditional): Fix the file look

Re: gnulib-tool --extract-filelist whitespace diff fix

2024-03-20 Thread Collin Funk
m not sure if any files in modules/* have extra newlines like this, but the more close the gnulib-tool's behave the better. CollinFrom 2b3e2e48ab53b1b4d0f209f835dddbea0312c3ea Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Wed, 20 Mar 2024 17:51:55 -0700 Subject: [PATCH] gnulib-tool.py: M

[PATCH] gnulib-tool.py: Fix --extract-recursive-link-directive.

2024-03-20 Thread Collin Funk
to sets. CollinFrom 3360beb64a6b1569131edf6644762046c9266082 Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Wed, 20 Mar 2024 19:07:50 -0700 Subject: [PATCH] gnulib-tool.py: Fix --extract-recursive-link-directive. * pygnulib/GLModuleSystem.py (GLModule.getLinkDirectiveRecursively): Check the &#x

Re: gnulib-tool --extract-filelist whitespace diff fix

2024-03-21 Thread Collin Funk
Hi Bruno, On 3/21/24 8:50 AM, Bruno Haible wrote: > Thanks, applied. With a small tweak in main.py, to make the 3 added files > more symmetric: Looks good. I was conflicted on whether or not to do this in the original patch. Collin

Re: [PATCH] gnulib-tool.py: Fix --extract-recursive-link-directive.

2024-03-21 Thread Collin Funk
Hi Bruno, On 3/21/24 9:00 AM, Bruno Haible wrote: > Thanks. So, we are still finding logic bugs... Which proves that the > test suite is necessary. I don't think we would have found this typo > by mere code review (within a finite time). Yes, agreed. The info-tests/* are very quick so it is easy

Re: test suite problem

2024-03-21 Thread Collin Funk
Hi Bruno, On 3/21/24 8:45 AM, Bruno Haible wrote: > Oh, indeed, the unit test works in the directory in which I committed it, > but does not work in a fresh git checkout :-( The .gitignore files > cause a lot of trouble. But it should be fixed by now. Thanks! I see you also fixed the 'autom4te.ca

Re: [PATCH] gnulib-tool.py: Fix unconditional Automake snippets for non-tests.

2024-03-21 Thread Collin Funk
Hi Bruno, On 3/21/24 2:26 PM, Bruno Haible wrote: > if extra_files != [''] and extra_files: > if extra_files != ['']: > if buildaux_files != ['']: > > Why does [''] represent the empty set/list here? Is something wrong with the > function filter

Re: test suite problem

2024-03-21 Thread Collin Funk
Hi Bruno, I assume you are using Autoconf 2.72? I don't see an easy way to fix this and Autoconf is trivial to install so it is probably just worth mentioning in the README. $ /usr/bin/autoconf --version autoconf (GNU Autoconf) 2.71 $ env GNULIB_TOOL_IMPL=py AUTOCONF=/usr/bin/autoconf ./test-emac

gl_AVOID extra space

2024-03-21 Thread Collin Funk
There is a minor whitespace diff in gnulib-cache.m4 for avoided modules. For example, after running 'test-emacs-1.sh', we see (omitting many entries because long lines): --- ./test-emacs-1.result/m4/gnulib-cache.m42024-03-21 17:47:04.460177611 -0700 +++ tmp1158700-result/m4/gnulib-cache.m4

Re: gl_AVOID extra space

2024-03-21 Thread Collin Funk
On 3/21/24 7:03 PM, Bruno Haible wrote: > I prefer to remove the redundant space. So, I took your diff, completed it, > committed it in your name, and updated the unit tests. Thanks! The --avoid case with no equal wasn't on my screen so I didn't see it... Collin

Re: test suite problem

2024-03-21 Thread Collin Funk
On 3/21/24 7:29 PM, Bruno Haible wrote: > I've now added the 'test-hello-c-gnulib-automakesubdir-withtests-1.sh' > test, among others. With this, I think adding Bison is redundant. Thanks. I'll look into the Bison error once gnulib-tool.py.TODO is done and more tests pass. Collin

Re: [PATCH] gnulib-tool.py: Fix unconditional Automake snippets for non-tests.

2024-03-22 Thread Collin Funk
Hi Bruno, Here is a patch with some updates now that I looked into the issue a bit more. I've also added the comments and fixed the build-aux issue you noticed. On 3/21/24 3:20 PM, Collin Funk wrote: > This is > because filter_filelist can return a non-empty list with an empty >

Re: gnulib-tool.py: Fix an error in --create-testdir

2024-03-22 Thread Collin Funk
Hi Bruno, On 3/22/24 8:02 AM, Bruno Haible wrote: > This test error > > $ GNULIB_TOOL_IMPL=py ./test-create-testdir-1.sh > configure.ac:8: installing 'build-aux/compile' > configure.ac:4: installing 'build-aux/install-sh' > configure.ac:4: installing 'build-aux/missing' > gllib/Makefile.am: inst

[PATCH] gnulib-tool.py: Fix empty newline output in test directories.

2024-03-22 Thread Collin Funk
re closely resembles the 'echo' invocations. Nothing worth losing sleep over, but worth keeping in mind. CollinFrom 10552567f36ffd5fb8e27de785b39bf00c051d39 Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Fri, 22 Mar 2024 12:19:28 -0700 Subject: [PATCH] gnulib-tool.py: Fix empty newline

[PATCH] gnulib-tool.py: Don't remove newlines in testdir's Automake snippets.

2024-03-22 Thread Collin Funk
; do CollinFrom 6fd480c18b7060c0ad596d5e9dd1fbc3f5f9ccb1 Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Fri, 22 Mar 2024 12:57:01 -0700 Subject: [PATCH 2/2] gnulib-tool.py: Don't remove newlines in testdir's Automake snippets. * pygnulib/GLTestDir.py (GLTestDir.execute): Don't

[PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 69.

2024-03-22 Thread Collin Funk
0; then Then have something like this in init.sh? I'm not sure if this would also apply to the test directory tests. CollinFrom b163f88f90453f20564960265a3cb5236c33ba85 Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Fri, 22 Mar 2024 19:43:41 -0700 Subject: [PATCH] gnulib-tool.py: Follow g

[PATCH] gnulib-tool.py: Don't use --[no]-vc-files unless explicitly given.

2024-03-23 Thread Collin Funk
105df5baf3 Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Sat, 23 Mar 2024 00:53:55 -0700 Subject: [PATCH 2/2] gnulib-tool.py: Don't use --[no]-vc-files unless explicitly given. * pygnulib/GLImport.py (GLImport.actioncmd): Check that vc_files is not None before treating it as a bool. (GLI

Re: [PATCH] gnulib-tool.py: Don't use --[no]-vc-files unless explicitly given.

2024-03-23 Thread Collin Funk
On 3/23/24 3:54 AM, Bruno Haible wrote: > But this part of your patch is a no-op, since > > >>> None == True > False > >>> None == False > False > > No? Oops... Yes you are right. I'm used to writing this: if value: print('1') else: print('2') instead of this: if value == Tru

Re: [PATCH] gnulib-tool.py: Don't use --[no]-vc-files unless explicitly given.

2024-03-23 Thread Collin Funk
nts in the future will help: # This vc_files: bool | None # Not this vc_files: bool I've attached an updated patch. CollinFrom 25173b648f1c0d89cc678fae240dbdb60d67e1ff Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Sat, 23 Mar 2024 12:55:58 -0700 Subject: [PATCH] gnulib-tool.py: Don

Re: gnulib-tool.py: Update TODO file

2024-03-23 Thread Collin Funk
Hi Bruno, On 3/23/24 8:30 AM, Bruno Haible wrote: > So, I've trimmed and reorganized the TODO file. Thanks for checking these. I was going to mention a few of them but you beat me to it. :) Since one bullet point is inlining 'sed' invocations, it might also be worth considering doing the same fo

Re: [PATCH] maint: Allow gnulib's readutmp module to use systemd.

2024-03-23 Thread Collin Funk
Hi Simon, On 3/23/24 2:24 AM, Simon Josefsson wrote: > Is there a way to opt-in inetutils to prefer python gnulib-tool, before > gnulib as a whole changes its default behaviour? I think doing that > will allow better testing of gnulib-tool.py in the wild until gnulib as > a whole can change. Thi

Re: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 69.

2024-03-23 Thread Collin Funk
Hi Bruno, On 3/23/24 3:49 AM, Bruno Haible wrote: > What's still missing, is the handling of 'files_removed'. > GLImport.py lines 804..820 ought to match gnulib-tool.sh lines 6253..6273. Sorry I haven't fixed this yet. I'm pretty sure I have been overthinking this issue for the past hour or two h

Re: gnulib-tool.py: Update TODO file

2024-03-23 Thread Collin Funk
On 3/23/24 5:01 PM, Bruno Haible wrote: > * Is os.walk() as efficient as the 'find' command? On some file systems, > determining the type (file vs. directory) of a directory entry requires > an extra stat() call; on others, it is no extra overhead. We can assume > that the 'find' command is w

Question about gnulib-tool coreutils test case

2024-03-24 Thread Collin Funk
Hi Bruno, I think that the test-coreutils-1.sh test is missing --local-dir=gl. Was this intentional? From test-coreutils-1.err: $ cat test-coreutils-1.err gnulib-tool: warning: module buffer-lcm doesn't exist gnulib-tool: warning: module cl-strtod doesn't exist gnulib-tool: warning: module cl-st

Re: gnulib-tool.py: Bring the output into the right order

2024-03-24 Thread Collin Funk
On 3/24/24 2:51 PM, Bruno Haible wrote: > In the test-create-testdir-4.sh output, entire chunks of output are not > in the natural order. The reason is that a subprocess produces output > while the parent process still has some output sitting it its buffers. Good catch. It looks like you've made a

Re: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 69.

2024-03-24 Thread Collin Funk
On 3/23/24 7:15 PM, Bruno Haible wrote: > :-D Well, that's the principle of a von-Neumann computer: that a program > (consisting of instructions) can assemble other instructions, to form a new > program. For CPU instructions, it's a well-known technique. For 'sed' > programs, apparently not... LOL

Re: [PATCH] gnulib-tool.py: Follow gnulib-tool changes, part 69.

2024-03-24 Thread Collin Funk
"$tmp"/ignore-removed; turns into: if srcdata != destdata: It seems to produce the same output at the moment, but I'm not sure if that is just luck. I rather look into that more too. CollinFrom 9f128d511b95aad974867b8f84b91b1e996a8cde Mon Sep 17 00:00:00 2001 From: Collin

[PATCH] gnulib-tool.py: Fix "Creating directory" output.

2024-03-24 Thread Collin Funk
ys([ os.path.dirname(pair[0]) +for pair in filetable['new'] ]))) +dirs = [ os.path.join(destdir, d) + for d in dirs ] for directory in dirs: if not isdir(directory): print('Crea

[PATCH] gnulib-tool.py: Handle removed files in the vc ignore files.

2024-03-24 Thread Collin Funk
ot;/ignore-removed. I would just use the basename of the files from gnulib-tool.sh but 'ignore' is already used and assigned to '.gitignore' or '.cvsignore'. :( Feel free to change it however you like (assuming the patch is correct). CollinFrom 34ce5aefe9bea002534

[PATCH] gnulib-tool.py: Fix output of #include directive advice.

2024-03-25 Thread Collin Funk
lude #elif HAVE_WS2TCPIP_H # include #endif Probably not worth changing the comment for that one exception though. :) CollinFrom d0fe63699d4c01b97e920e3c87b3dd95ffb52824 Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Mon, 25 Mar 2024 01:56:24 -0700 Subject: [PATCH 2/2] gnulib-tool.py: Fix output of #

Re: [PATCH] gnulib-tool.py: Handle removed files in the vc ignore files.

2024-03-25 Thread Collin Funk
Hi Bruno, On 3/25/24 5:00 AM, Bruno Haible wrote: > - Your ability to work with misnamed variables is amazing. But > nonetheless let's make an effort to find better names :) LOL, I appreciate the compliment, but yes I agree better naming is good. > - Python has enough string processing primiti

Re: [PATCH] gnulib-tool.py: Fix "Creating directory" output.

2024-03-25 Thread Collin Funk
Hi Bruno, On 3/25/24 5:20 AM, Bruno Haible wrote: > You don't need this trick here, since we sort this part of the list > anyway, for compatibility with gnulib-tool.sh. > > This occurred also with the EXTRA_DIST augmentations: Oops, you are right. It is easy for me to forget where things are sor

Re: [PATCH] gnulib-tool.py: Fix output of #include directive advice.

2024-03-25 Thread Collin Funk
On 3/25/24 5:45 AM, Bruno Haible wrote: > I don't see it as misleading. In test-wget2-1.out, the '#include > ' > occurs a second time, but that's for a good reason. Ah, I meant to check that. I didn't see it occurred in wget2. Thanks! > Thanks, applied with a tweak. (One could alternatively use

[PATCH] gnulib-tool.py: Only process configure.ac once.

2024-03-25 Thread Collin Funk
I just created a testdir and put the 'subdir-objects' in configure.ac and then moved it to Makefile.am. That should be enough to make sure I didn't accidentally add any unbound variables or anything. I'm not sure if you want to add a test case which uses configure.in. Maybe just ch

[PATCH] gnulib-tool.py: Fix sorting of modules when --local-dir is used.

2024-03-25 Thread Collin Funk
out how to write it so that it isn't ugly. :) [1] https://docs.python.org/3/howto/sorting.html#odds-and-ends [2] https://www.gnu.org/software/gnulib/manual/gnulib.html#Extending-Gnulib CollinFrom 18d4b947255f910cd93b9aec4963d03231b15913 Mon Sep 17 00:00:00 2001 From: Collin Funk Date: M

[PATCH] gnulib-tool.py: Store the module name instead of computing it.

2024-03-25 Thread Collin Funk
On 3/25/24 10:27 PM, Collin Funk wrote: > But that is an easy fix. I just have to figure out how to write it so > that it isn't ugly. :) I was not very successful at making it not ugly... It seems that Python has an index() function to find the first occurrence of an item in a lis

Re: [PATCH] gnulib-tool.py: Store the module name instead of computing it.

2024-03-26 Thread Collin Funk
Hi Bruno, On 3/26/24 5:20 AM, Bruno Haible wrote: > Regarding the 'modules' subdirectory: When I see you replacing 2 lines of code > with 8 lines of code, and especially searching for a 'modules' file name > component, I wonder whether there's no simpler solution. > Namely, a module of name NAME c

Re: [PATCH] gnulib-tool.py: Only process configure.ac once.

2024-03-26 Thread Collin Funk
find configure.ac - make sure you run gnulib-tool from within your package's directory /home/collin/.local/src/gnulib/gnulib-tool.py: *** Stop. CollinFrom 5951d7c55eb31c7892349fc468d989d5fba8a422 Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Tue, 26 Mar 2024 15:43:21 -0700 Subject: [PATCH

Re: [PATCH] gnulib-tool.py: Store the module name instead of computing it.

2024-03-26 Thread Collin Funk
o ensure type hints + no future changes break compatibility with older Python versions. And doesn't require learning the complicated virtual environment stuff. CollinFrom 56b4990c7ca5224655525accf83c1e4c9094acf5 Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Tue, 26 Mar 2024 16:26:39 -07

Re: [PATCH] gnulib-tool.py: Store the module name instead of computing it.

2024-03-26 Thread Collin Funk
Hi Bruno, On 3/26/24 5:18 PM, Bruno Haible wrote: > Yes. Sounds good. Would you prefer one patch with all of the changes or one per file? I'm happy either way, so whatever would make it easier for you if you want to review the changes. > I'm reluctant to add a dependency on yet another environme

Re: [PATCH] gnulib-tool.py: Add type hints to all functions.

2024-03-27 Thread Collin Funk
Hi Bruno, On 3/27/24 9:34 AM, Bruno Haible wrote: > It will also help further development: In large pieces of code, it's > easier to understand the existing code and make modifications if there > are type annotations with a decent syntax. > (By "decent syntax" I do *not* mean the K&R C syntax or t

Re: [PATCH] gnulib-tool.py: Add type hints to all functions.

2024-03-27 Thread Collin Funk
Hi Bruno, On 3/27/24 3:11 PM, Bruno Haible wrote: > I guess the strange syntax comes from > - a wish to treat all ISO C extensions in a similar way syntactically, > without extending the parser too much, And then MSVC tries to do everything differently. :) #pragma pack() vs. __attribute__ (

[PATCH] gnulib-tool.py: Inline 'sed' invocations used on library files.

2024-03-27 Thread Collin Funk
hem all at once. To test this change you can use the coreutils import test case. It uses the config-h module for lib/vfprintf.c and friends. CollinFrom 639d368ed6378e71a5a5478e04c2422239287ad2 Mon Sep 17 00:00:00 2001 From: Collin Funk Date: Wed, 27 Mar 2024 17:39:58 -0700 Subject: [PATCH] gnulib-

Re: [PATCH] gnulib-tool.py: Inline 'sed' invocations used on library files.

2024-03-27 Thread Collin Funk
On 3/27/24 5:51 PM, Collin Funk wrote: > Hi Bruno, > > Here is the 'sed' inlining I mentioned earlier. Oops, the I accidently sent the patch with this: # Determine script to apply to library files that go into $testsbase/. -sed_transform_te

Re: Python Iterable

2024-03-27 Thread Collin Funk
On 3/27/24 9:52 AM, Bruno Haible wrote: > I agree. My main considerations are: > > - Can someone with little exposure to Python understand and modify the > code? When you write 'list' and the developer knows that 'list' means > what is known as "array" in other programming languages, the

<    1   2   3   4   5   6   7   8   9   >