[OE-core] [PATCH 1/1] systemd: ignore qemu output, and check its return code

Rongqing Li rongqing.li at windriver.com
Thu Aug 8 08:53:49 UTC 2013



On 08/08/2013 02:26 AM, Khem Raj wrote:
>
> On Aug 7, 2013, at 12:30 AM, Rongqing Li <rongqing.li at windriver.com> wrote:
>
>> ping
>>
>> On 07/24/2013 01:24 PM, rongqing.li at windriver.com wrote:
>>> From: "Roy.Li" <rongqing.li at windriver.com>
>>>
>>> qemu prints errors sometime, but it works well,
>
>
> how do you know ?
>

echo $? and output of "udevadm hwdb --update --root $D" shows
it works well.

-Roy


>>> the error information
>>> can be captured by rpm, and lead to rpm failure. like:
>>>
>>> 	$export D=/tmp/rootfs;.../usr/bin/qemu-i386 -L $D \
>>> 		-E LD_LIBRARY_PATH=$D/usr/lib:$D/lib $D/bin/udevadm hwdb --update --root $D
>>> 	qemu: Unsupported syscall: 240
>>> 	$echo $?
>>> 	$ 0
>>>
>>> Signed-off-by: Roy.Li <rongqing.li at windriver.com>
>>> ---
>>>   meta/recipes-core/systemd/systemd_204.bb |    4 +++-
>>>   1 file changed, 3 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/meta/recipes-core/systemd/systemd_204.bb b/meta/recipes-core/systemd/systemd_204.bb
>>> index b8b1290..10bde33 100644
>>> --- a/meta/recipes-core/systemd/systemd_204.bb
>>> +++ b/meta/recipes-core/systemd/systemd_204.bb
>>> @@ -277,7 +277,9 @@ ALTERNATIVE_PRIORITY[poweroff] ?= "300"
>>>   pkg_postinst_udev-hwdb () {
>>>   	if test -n "$D"; then
>>>   		${@qemu_run_binary(d, '$D', '${base_bindir}/udevadm')} hwdb --update \
>>> -			--root $D
>>> +			--root $D 2>/dev/null
>>> +
>>> +		[ $? -ne 0 ] && exit 1
>>>   	else
>>>   		udevadm hwdb --update
>>>   	fi
>>>
>>
>> --
>> Best Reagrds,
>> Roy | RongQing Li
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core at lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
>
>

-- 
Best Reagrds,
Roy | RongQing Li



More information about the Openembedded-core mailing list