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/rpm.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/rpm.py')
-rw-r--r-- | mesonbuild/modules/rpm.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/mesonbuild/modules/rpm.py b/mesonbuild/modules/rpm.py index 13aa20b..e9f6396 100644 --- a/mesonbuild/modules/rpm.py +++ b/mesonbuild/modules/rpm.py @@ -63,8 +63,8 @@ class RPMModule: so_installed = True elif isinstance(target, build.StaticLibrary) and target.need_install: to_delete.add('%%{buildroot}%%{_libdir}/%s' % target.get_filename()) - mlog.log('Warning, removing', mlog.bold(target.get_filename()), - 'from package because packaging static libs not recommended') + mlog.warning('removing', mlog.bold(target.get_filename()), + 'from package because packaging static libs not recommended') elif isinstance(target, gnome.GirTarget) and target.should_install(): files_devel.add('%%{_datadir}/gir-1.0/%s' % target.get_filename()[0]) elif isinstance(target, gnome.TypelibTarget) and target.should_install(): @@ -97,11 +97,10 @@ class RPMModule: fn.write('BuildRequires: pkgconfig(%s)\n' % dep) for lib in state.environment.coredata.ext_libs.values(): fn.write('BuildRequires: %s # FIXME\n' % lib.fullpath) - mlog.log('Warning, replace', mlog.bold(lib.fullpath), - 'with real package.', - 'You can use following command to find package which ' - 'contains this lib:', - mlog.bold('dnf provides %s' % lib.fullpath)) + mlog.warning('replace', mlog.bold(lib.fullpath), 'with real package.', + 'You can use following command to find package which ' + 'contains this lib:', + mlog.bold('dnf provides %s' % lib.fullpath)) for prog in state.environment.coredata.ext_progs.values(): if not prog.found(): fn.write('BuildRequires: %{_bindir}/%s # FIXME\n' % |