Skip to content

Commit

Permalink
build: make 'floating patch' message informational
Browse files Browse the repository at this point in the history
Downgrade the 'Using floating patch' message that is emitted
when a local patch is applied to the bundled ICU from a warning
to a notice. There isn't anything the user can or should do so
warning isn't appropriate. Instead of angry yellow use soothing green.

Fixes: #26346

PR-URL: #26349
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
  • Loading branch information
bnoordhuis authored and addaleax committed Mar 2, 2019
1 parent 8cf4170 commit 05e6ec0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,10 @@ def warn(msg):
# track if warnings occurred
warn.warned = False

def info(msg):
prefix = '\033[1m\033[32mINFO\033[0m' if os.isatty(1) else 'INFO'
print('%s: %s' % (prefix, msg))

def print_verbose(x):
if not options.verbose:
return
Expand Down Expand Up @@ -1288,7 +1292,7 @@ def glob_to_var(dir_base, dir_sub, patch_dir):
patchfile = '%s/%s/%s' % (dir_base, patch_dir, file)
if os.path.isfile(patchfile):
srcfile = '%s/%s' % (patch_dir, file)
warn('Using floating patch "%s" from "%s"' % (patchfile, dir_base))
info('Using floating patch "%s" from "%s"' % (patchfile, dir_base))
list.append(srcfile)
break
return list
Expand Down

0 comments on commit 05e6ec0

Please sign in to comment.