Bug 65415

Summary: Do not print "Now type 'make' to compile $PROJECT." which may confuse *BSD users
Product: dbus Reporter: Chengwei Yang <chengwei.yang.cn>
Component: coreAssignee: Simon McVittie <smcv>
Status: RESOLVED FIXED QA Contact: Havoc Pennington <hp>
Severity: enhancement    
Priority: lowest CC: chengwei.yang.cn
Version: 1.5Keywords: patch
Hardware: Other   
OS: All   
Whiteboard: r+
i915 platform: i915 features:
Attachments: Do not suggest user to do make if configure failed
[PATCH v2] Do not suggest user to do make if configure failed
[PATCH] Do not suggest user the next step after executed autogen.sh

Description Chengwei Yang 2013-06-05 13:10:55 UTC
After autogen.sh finished, it always print

Now type 'make' to compile $PROJECT(dbus).

regardless if the configure succeed or failed. Like below

---------->8-------------->8--------------------
checking pkg-config is at least version 0.9.0... yes
checking for XML_ParserCreate_MM in -lexpat... no
configure: error: Could not find expat.h, check config.log for failed attempts

Now type 'make' to compile dbus.
---------->8-------------->8--------------------

It's very likely to do a misleading make in this condition.
Comment 1 Chengwei Yang 2013-06-05 13:14:49 UTC
Created attachment 80343 [details] [review]
Do not suggest user to do make if configure failed
Comment 2 Simon McVittie 2013-06-05 14:55:22 UTC
Comment on attachment 80343 [details] [review]
Do not suggest user to do make if configure failed

Review of attachment 80343 [details] [review]:
-----------------------------------------------------------------

::: autogen.sh
@@ +102,3 @@
>  
>  if $run_configure; then
>      $srcdir/configure --enable-developer --config-cache "$@"

You could just do

  $srcdir/configure ... "$@" || exit $?

and the echo wouldn't be done on failure.

Ideally, shell scripts like this should be running under "set -e" so that it failed as soon as something didn't work correctly, but that would require fixing various things that are going to fail (replacing the "test -z "$srcdir" && ..." with a proper "if" block, etc.).

I'd also accept a patch that deleted the "Now type..." bits altogether. dbus is an OS component with some relatively subtle system-integration considerations, so anyone who isn't already familiar with the usual autogen.sh, configure, make, make install sequence should be using the dbus packages provided by their distribution.
Comment 3 Chengwei Yang 2013-06-06 03:38:00 UTC
(In reply to comment #2)
> Comment on attachment 80343 [details] [review] [review]
> Do not suggest user to do make if configure failed
> 
> Review of attachment 80343 [details] [review] [review]:
> -----------------------------------------------------------------
> 
> ::: autogen.sh
> @@ +102,3 @@
> >  
> >  if $run_configure; then
> >      $srcdir/configure --enable-developer --config-cache "$@"
> 
> You could just do
> 
>   $srcdir/configure ... "$@" || exit $?
> 
> and the echo wouldn't be done on failure.
> 

Agreed, see patch v2.

> Ideally, shell scripts like this should be running under "set -e" so that it
> failed as soon as something didn't work correctly, but that would require
> fixing various things that are going to fail (replacing the "test -z
> "$srcdir" && ..." with a proper "if" block, etc.).
> 
> I'd also accept a patch that deleted the "Now type..." bits altogether. dbus
> is an OS component with some relatively subtle system-integration
> considerations, so anyone who isn't already familiar with the usual
> autogen.sh, configure, make, make install sequence should be using the dbus
> packages provided by their distribution.
Comment 4 Chengwei Yang 2013-06-06 03:38:43 UTC
Created attachment 80379 [details] [review]
[PATCH v2] Do not suggest user to do make if configure failed
Comment 5 Simon McVittie 2013-06-06 11:58:18 UTC
Applied, will be in 1.7.4.
Comment 6 Chengwei Yang 2013-09-24 13:22:59 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > Comment on attachment 80343 [details] [review] [review] [review]
> > Do not suggest user to do make if configure failed
> > 
> > Review of attachment 80343 [details] [review] [review] [review]:
> > -----------------------------------------------------------------
> > 
> > ::: autogen.sh
> > @@ +102,3 @@
> > >  
> > >  if $run_configure; then
> > >      $srcdir/configure --enable-developer --config-cache "$@"
> > 
> > You could just do
> > 
> >   $srcdir/configure ... "$@" || exit $?
> > 
> > and the echo wouldn't be done on failure.
> > 
> 
> Agreed, see patch v2.
> 
> > Ideally, shell scripts like this should be running under "set -e" so that it
> > failed as soon as something didn't work correctly, but that would require
> > fixing various things that are going to fail (replacing the "test -z
> > "$srcdir" && ..." with a proper "if" block, etc.).
> > 
> > I'd also accept a patch that deleted the "Now type..." bits altogether. dbus

After re-thinking a little more, I think it's better to delete the "Now type..." bits.

As we assumed that who build dbus from source should familiar with 'autogen.sh, configure, make, make install', and 'make' in *BSD, freeBSD verified, doesn't work. So the "Now typpe 'make'..." will do confuse new beginners who working on *BSD.

So a patch to delete that line comes.
> > is an OS component with some relatively subtle system-integration
> > considerations, so anyone who isn't already familiar with the usual
> > autogen.sh, configure, make, make install sequence should be using the dbus
> > packages provided by their distribution.
Comment 7 Chengwei Yang 2013-09-24 13:35:28 UTC
Created attachment 86452 [details] [review]
[PATCH] Do not suggest user the next step after executed autogen.sh
Comment 8 Simon McVittie 2013-09-30 11:36:31 UTC
queued, thanks
Comment 9 Simon McVittie 2013-10-08 09:56:10 UTC
1.7.6

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.