diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2016-11-08 15:53:47 +0530 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2016-11-08 17:43:24 -0500 |
commit | a2262103fb749b570c4096b43ee107ad7143c04e (patch) | |
tree | 0f92a5ddca431d391d8918c9d84ec23c32d99389 /mesonbuild/modules/gnome.py | |
parent | 841380acfe682023b0df9fa76debbe3030f31daa (diff) | |
download | meson-a2262103fb749b570c4096b43ee107ad7143c04e.zip meson-a2262103fb749b570c4096b43ee107ad7143c04e.tar.gz meson-a2262103fb749b570c4096b43ee107ad7143c04e.tar.bz2 |
Implement mlog.warning and use it everywhere for warnings
Prepends the string with 'WARNING:' in ANSI yellow.
Closes https://github.com/mesonbuild/meson/issues/961
Diffstat (limited to 'mesonbuild/modules/gnome.py')
-rw-r--r-- | mesonbuild/modules/gnome.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py index 27200ae..fa8aec4 100644 --- a/mesonbuild/modules/gnome.py +++ b/mesonbuild/modules/gnome.py @@ -44,10 +44,10 @@ class GnomeModule: global gresource_warning_printed if not gresource_warning_printed: if mesonlib.version_compare(self._get_native_glib_version(state), '< 2.50.0'): - mlog.log('Warning, GLib compiled dependencies do not work fully ' - 'with versions of GLib older than 2.50.0.\n' - 'See the following upstream issue:', - mlog.bold('https://bugzilla.gnome.org/show_bug.cgi?id=745754')) + mlog.warning('GLib compiled dependencies do not work fully ' + 'with versions of GLib older than 2.50.0.\n' + 'See the following upstream issue:', + mlog.bold('https://bugzilla.gnome.org/show_bug.cgi?id=745754')) gresource_warning_printed = True return [] @@ -136,7 +136,7 @@ class GnomeModule: cwd=state.environment.get_source_dir()) (stdout, _) = pc.communicate() if pc.returncode != 0: - mlog.log(mlog.bold('Warning:'), 'glib-compile-resources has failed to get the dependencies for {}'.format(cmd[1])) + mlog.warning('glib-compile-resources has failed to get the dependencies for {}'.format(cmd[1])) raise subprocess.CalledProcessError(pc.returncode, cmd) dep_files = stdout.split('\n')[:-1] @@ -297,7 +297,7 @@ class GnomeModule: except Exception: global girwarning_printed if not girwarning_printed: - mlog.log(mlog.bold('Warning:'), 'gobject-introspection dependency was not found, disabling gir generation.') + mlog.warning('gobject-introspection dependency was not found, disabling gir generation.') girwarning_printed = True return [] pkgargs = pkgstr.decode().strip().split() |