All of lore.kernel.org
 help / color / mirror / Atom feed
From: Darren Hart <dvhart@linux.intel.com>
To: Khem Raj <raj.khem@gmail.com>
Cc: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 2/4] autotools.bbclass: Report the missing configure path
Date: Wed, 30 Nov 2011 14:37:25 -0800	[thread overview]
Message-ID: <4ED6B025.1060705@linux.intel.com> (raw)
In-Reply-To: <CAMKF1sotPRfvMtbMYRBCtqpAj7CfYMzOzh1EORaOtBajzywwkA@mail.gmail.com>



On 11/30/2011 02:31 PM, Khem Raj wrote:
> On Wed, Nov 30, 2011 at 1:49 PM, Darren Hart <darren@dvhart.com> wrote:
>> From: Darren Hart <dvhart@linux.intel.com>
>>
>> If the configure script isn't found, report the explicit path tried.
>> This can help debug subtle errors where the ${S} sourcedir may not
>> be exactly what is expected.
>>
>> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
>> ---
>>  meta/classes/autotools.bbclass |    9 +++++----
>>  1 files changed, 5 insertions(+), 4 deletions(-)
>>
>> diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass
>> index 37e7d4b..7536bac 100644
>> --- a/meta/classes/autotools.bbclass
>> +++ b/meta/classes/autotools.bbclass
>> @@ -70,11 +70,12 @@ CONFIGUREOPT_DEPTRACK = "--disable-dependency-tracking"
>>
>>
>>  oe_runconf () {
>> -       if [ -x ${S}/configure ] ; then
>> -               bbnote "Running ${S}/configure ${CONFIGUREOPTS} ${EXTRA_OECONF} $@"
>> -               ${S}/configure ${CONFIGUREOPTS} ${EXTRA_OECONF} "$@" || bbfatal "oe_runconf failed"
>> +       cfgscript="${S}/configure"
>> +       if [ -x "$cfgscript" ] ; then
>> +               bbnote "Running $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} $@"
>> +               $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} "$@" || bbfatal "oe_runconf failed"
>>        else
>> -               bbfatal "no configure script found"
>> +               bbfatal "no configure script found at $cfgscript"
> 
> why not just do one line change something like
> 
> bbfatal "configure script ${S}/configure not found"

I prefer to use a variable when I need a value more than once. It avoids
future bugs where one is changed and the others were missed. As this
string is used 4 times, it seemed like the right call.

--
Darren

> 
>>        fi
>>  }
>>
>> --
>> 1.7.6.4
>>
>>
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel



  reply	other threads:[~2011-11-30 22:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-30 21:49 [PATCH 0/4] Cleanups: grub, autotools, meta-environment Darren Hart
2011-11-30 21:49 ` [PATCH 1/4] meta-environment: Fix a typo in do_populate_sysroot[noexec] Darren Hart
2011-11-30 21:49 ` [PATCH 2/4] autotools.bbclass: Report the missing configure path Darren Hart
2011-11-30 22:31   ` Khem Raj
2011-11-30 22:37     ` Darren Hart [this message]
2011-11-30 22:48       ` Khem Raj
2011-11-30 22:57         ` Darren Hart
2011-11-30 23:26           ` Khem Raj
2011-11-30 21:49 ` [PATCH 3/4] grub: Use COMPATIBLE_MACHINE Darren Hart
2011-11-30 21:57   ` Koen Kooi
2011-11-30 22:04     ` Darren Hart
2011-11-30 21:49 ` [PATCH 4/4] grub: Drop "apply=yes" from patch Darren Hart
2011-11-30 22:24 ` [PATCH 0/4] Cleanups: grub, autotools, meta-environment Richard Purdie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4ED6B025.1060705@linux.intel.com \
    --to=dvhart@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=raj.khem@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.