Skip to content

RPM Macros do not allow to disable verbose #14992

@DimStar77

Description

@DimStar77

I have identified a bug on the meson macros

%{?__meson_verbose:--verbose} \

i.e even setting __meson_verbose to 0 does not disable verbose

The issue comes from %{?__meson_verbose:--verbose} - where %{?__meson_verbose} does not check on any value, but rather on 'is defined'

A possible solution would be to switch meson_build and meson_install to use ternary operations, like:

%meson_build \
    %{shrink:%{__meson} compile \
    -C %{_vpath_builddir} \
    -j %{_smp_build_ncpus} \
    %[ 0%{?__meson_verbose} ? "--verbose" : "" ]\
    %{nil}}

%meson_install \
    %{shrink:DESTDIR=%{buildroot} %{__meson} install \
    -C %{_vpath_builddir} \
    --no-rebuild \
    %[ ! 0%{?__meson_verbose} ? "--quiet" : "" ] \
    %{nil}}

Drawback: this is only supported from RPM 4.15 on

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions