[Mesa-dev] [PATCH] meson: Print a message about why a libdrm version was selected
Eric Engestrom
eric.engestrom at intel.com
Wed Sep 5 09:14:47 UTC 2018
On Tuesday, 2018-09-04 14:47:01 -0700, Dylan Baker wrote:
> We require a single version of libdrm for all of our libdrm
> dependencies (core and driver), but the way this is structured can make
> the error message less than helpful, as one driver might be the one
> setting the libdrm requirement, while another might be the one that
> generates the version failure.
>
> This adds a simple message to the output announcing which libdrm module
> set the version, which might be more helpful.
>
> Fixes: c445b1d56f47922206de55e557444aadb62e11f6
> ("meson: Use the same version for all libdrm checks")
> ---
> meson.build | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/meson.build b/meson.build
> index 7f6f128e0b2..d85f92fd087 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -1121,12 +1121,17 @@ endif
>
> # Loop over the enables versions and get the highest libdrm requirement for all
> # active drivers.
> +_drm_blame = ''
> foreach d : _libdrm_checks
> ver = get_variable('_drm_ at 0@_ver'.format(d[0]))
> if d[1] and ver.version_compare('>' + _drm_ver)
> _drm_ver = ver
> + _drm_blame = d[0]
> endif
> endforeach
> +if _drm_blame != ''
> + message('libdrm requirment set to @0@ because of @1@'.format(_drm_ver, _drm_blame))
^ typo
I would phrase it a bit differently:
message('libdrm @0@ needed because @1@ has the highest requirement'.format(_drm_ver, _drm_blame))
But I fully agree with printing that message, so:
Reviewed-by: Eric Engestrom <eric.engestrom at intel.com>
> +endif
>
> # Then get each libdrm module
> foreach d : _libdrm_checks
> --
> 2.18.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list