[libvirt PATCH 1/4] meson: Print custom message when GNU grep is not installed

Erik Skultety eskultet at redhat.com
Thu Apr 1 09:23:23 UTC 2021


On Thu, Apr 01, 2021 at 11:10:05AM +0200, Erik Skultety wrote:
> On Wed, Mar 24, 2021 at 07:37:57PM +0100, Andrea Bolognani wrote:
> > Currently, if GNU grep is not installed on a FreeBSD system the
> > configuration step will fail with
> > 
> >   Program grep found: YES (/usr/bin/grep)
> >   Program /usr/local/bin/grep found: NO
> > 
> >   ERROR: Program '/usr/local/bin/grep' not found
> > 
> > which is confusing and not very useful; after this change, the
> > message will be
> > 
> >   Program grep found: YES (/usr/bin/grep)
> >   Program /usr/local/bin/grep found: NO
> > 
> >   ERROR: Problem encountered: GNU grep not found
> > 
> > instead, which should do a better job helping the user figure
> > out that they need to install GNU grep from ports to proceed.
> > 
> > Signed-off-by: Andrea Bolognani <abologna at redhat.com>
> > ---
> Reviewed-by: Erik Skultety <eskultet at redhat.com>

Please squash this in before merging:

diff --git a/build-aux/meson.build b/build-aux/meson.build
index 1095982397..e491bdeebc 100644
--- a/build-aux/meson.build
+++ b/build-aux/meson.build
@@ -26,10 +26,6 @@ if host_machine.system() == 'freebsd'
     if not grep_prog.found()
       error('GNU grep not found')
     endif
-    grep_cmd = run_command(grep_prog, '--version')
-    if grep_cmd.stdout().startswith('grep (BSD grep')
-      error('GNU grep not found')
-    endif
   endif
 elif host_machine.system() == 'darwin'
   grep_prog = find_program('ggrep')




More information about the libvir-list mailing list