+2024-03-24 Bruno Haible <bruno@clisp.org>
+
+ gnulib-tool.py: Fix output of notices.
+ * pygnulib/GLTestDir.py (GLTestDir.execute): Don't print notices if the
+ verbosity is < -1. Strip newlines from each notice.
+ * pygnulib/GLImport.py (GLImport.prepare): Don't print notices if the
+ verbosity is < -1. Strip only newlines, not spaces.
+
2024-03-23 Bruno Haible <bruno@clisp.org>
gnulib-tool.py: Fix the modules indentation in --create-testdir' output.
raise GLError(11, listing)
# Print notices from modules.
- for module in main_modules:
- notice = module.getNotice()
- notice = notice.strip()
- if notice:
- print('Notice from module %s:' % str(module))
- pattern = re.compile('^(.*?)$', re.S | re.M)
- notice = pattern.sub(' \\1', notice)
- print(notice)
+ if verbose >= -1:
+ for module in main_modules:
+ notice = module.getNotice().strip('\n')
+ if notice:
+ print('Notice from module %s:' % str(module))
+ pattern = re.compile('^(.*?)$', re.S | re.M)
+ notice = pattern.sub(' \\1', notice)
+ print(notice)
# Determine script to apply to imported library files.
sed_transform_lib_file = ''
# Show banner notice of every module.
if single_configure:
- for module in main_modules:
- notice = module.getNotice()
- if notice:
- print('Notice from module %s:' % str(module))
- pattern = re.compile('^(.*)$', re.M)
- notice = pattern.sub(' \\1', notice)
- print(notice)
+ if verbose >= -1:
+ for module in main_modules:
+ notice = module.getNotice().strip('\n')
+ if notice:
+ print('Notice from module %s:' % str(module))
+ pattern = re.compile('^(.*)$', re.M)
+ notice = pattern.sub(' \\1', notice)
+ print(notice)
else: # if not single_configure
- for module in modules:
- notice = module.getNotice()
- if notice:
- print('Notice from module %s:' % str(module))
- pattern = re.compile('^(.*)$', re.M)
- notice = pattern.sub(' \\1', notice)
- print(notice)
+ if verbose >= -1:
+ for module in modules:
+ notice = module.getNotice().strip('\n')
+ if notice:
+ print('Notice from module %s:' % str(module))
+ pattern = re.compile('^(.*)$', re.M)
+ notice = pattern.sub(' \\1', notice)
+ print(notice)
# Determine final file list.
if single_configure: