summaryrefslogtreecommitdiff
path: root/gnulib-tool.py.TODO
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2022-08-07 22:53:32 +0200
committerBruno Haible <bruno@clisp.org>2022-08-07 23:04:30 +0200
commit81b8c4d5565dbbea10eb3561063d2e8da52148d7 (patch)
tree2e1054c688f7d41bf10a9ea2527f9438b1979e74 /gnulib-tool.py.TODO
parent586000e597d4ef7cba8de869a15ad5c922a2010c (diff)
downloadgnulib-81b8c4d5565dbbea10eb3561063d2e8da52148d7.tar.gz
gnulib-tool.py: Fix section extraction from module descriptions.
The code with self.content.split(section)[-1] was broken because it recognizes an indented section label. Similar code with ('\n' + self.content).split('\n' + section)[-1] would still be broken because it recognizes an indented section label in the first line of the file. The code with section_label_regex was broken because sometimes it returns the second-to-last section with the given label, not the last one. Also, whitespace after the colon was not ignored. * pygnulib/GLModuleSystem.py (GLModule.__init__): Dissect the module description's contents immediately, once only, in a reliable way. (GLModule.getDescription, GLModule.getComment): Simplify. (GLModule.getStatus): Simplify. Return a string. (GLModule.getStatuses): New function. Return a list. (GLModule.getNotice, GLModule.getApplicability, GLModule.getFiles, GLModule.getDependencies, GLModules.getAutoconfSnippet_Early, GLModules.getAutoconfSnippet, GLModule.getAutomakeSnippet_Conditional, GLModule.getInclude, GLModule.getLink, GLModule.getLicense_Raw): Simplify. (GLModule.getLicense): Remove whitespace after calling getLicense_Raw. (GLModule.getMaintainer): Simplify. (GLModuleTable.transitive_closure): Call getStatuses() instead of getStatus(). * pygnulib/GLEmiter.py: Likewise. * gnulib-tool.py (main): For --extract-description, --extract-comment, --extract-status, --extract-notice, --extract-autoconf-snippet, --extract-automake-snippet, --extract-include-directive, --extract-link-directive, --extract-maintainer, don't add an extra newline after the snippet.
Diffstat (limited to 'gnulib-tool.py.TODO')
-rw-r--r--gnulib-tool.py.TODO1
1 files changed, 0 insertions, 1 deletions
diff --git a/gnulib-tool.py.TODO b/gnulib-tool.py.TODO
index a46da5e2ad..9efcda510d 100644
--- a/gnulib-tool.py.TODO
+++ b/gnulib-tool.py.TODO
@@ -37,7 +37,6 @@ Implement the options:
Remove exit() in GLImport.py.
Optimize:
- - GLModuleSystem: Parse each module description only once.
- os.chdir around subprocess creation -> cwd=... argument instead.
--------------------------------------------------------------------------------