[OE-core] [PATCH v2 4/7] toolchain-shar-extract: print post-relocate error
Martin Kelly
mkelly at xevo.com
Fri Jun 1 22:00:01 UTC 2018
On 06/01/2018 02:57 PM, Joshua Watt wrote:
> On Fri, 2018-06-01 at 14:02 -0700, Martin Kelly wrote:
>> Currently, if a post-relocate script fails, it fails silently. We
>> should
>> be louder about this, as it likely indicates a broken SDK.
>>
>> Print a message if a post-relocate script fails.
>>
>> Signed-off-by: Martin Kelly <mkelly at xevo.com>
>> ---
>> meta/classes/toolchain-scripts.bbclass | 5 +++++
>> 1 file changed, 5 insertions(+)
>>
>> diff --git a/meta/classes/toolchain-scripts.bbclass
>> b/meta/classes/toolchain-scripts.bbclass
>> index cbba07838a..ae7bbef034 100644
>> --- a/meta/classes/toolchain-scripts.bbclass
>> +++ b/meta/classes/toolchain-scripts.bbclass
>> @@ -126,6 +126,11 @@ toolchain_create_post_relocate_script() {
>> if [ -d "${SDKPATHNATIVE}/post-relocate-setup.d/" ]; then
>> for s in ${SDKPATHNATIVE}/post-relocate-setup.d/*; do
>
> Perhaps worth adding:
>
> [ -x \$s ] || continue
>
> ?
>
Yes, good idea. I will add it in the next revision, after I wait a day
or two more for other reviews.
>> \$s "\$1"
>> + status=\$?
>> + if [ \$status != 0 ]; then
>> + echo "post-relocate command \"\$s \$1\" failed with
>> status \$status" >&2
>> + exit \$status
>> + fi
>> done
>> rm -rf "${SDKPATHNATIVE}/post-relocate-setup.d"
>> fi
More information about the Openembedded-core
mailing list