[bitbake-devel] [PATCH 2/2] hob2: create a standalone deploy image tool

Darren Hart dvhart at linux.intel.com
Tue Jun 5 17:24:41 UTC 2012



On 06/05/2012 01:15 AM, Kang Kai wrote:
> On 2012年06月05日 15:40, Wang, Shane wrote:
>> Kang Kai wrote on 2012-06-05:
>>
>>> On 2012年06月05日 14:42, Wang, Shane wrote:
>>>>> -----Original Message-----
>>>>> From: Kang Kai [mailto:kai.kang at windriver.com]
>>>>> Sent: Tuesday, June 05, 2012 11:37 AM
>>>>> To: dvhart at linux.intel.com
>>>>> Cc: Wang, Shane; zhenfeng.zhao at windriver.com;
>>>>> bitbake-devel at lists.openembedded.org
>>>>> Subject: [PATCH 2/2] hob2: create a standalone deploy image tool
>>>>>
>>>>> diff --git a/bitbake/lib/bb/ui/crumbs/utils.py
>>>>> b/bitbake/lib/bb/ui/crumbs/utils.py
>>>>> index cd01a04..939864f 100644
>>>>> --- a/bitbake/lib/bb/ui/crumbs/utils.py
>>>>> +++ b/bitbake/lib/bb/ui/crumbs/utils.py
>>>>> @@ -22,6 +22,7 @@
>>>>>    # bitbake which will allow more flexibility.
>>>>>
>>>>>    import os
>>>>> +import bb
>>>> Why is this needed? I don't see any change you made in utils.py.
>>>> Is that to say without this line, the functions in utils.py don't work?
>>> Without the import, it just complains that
>>>
>>> NameError: global name 'bb' is not defined
>>>
>>> Regards,
>>> Kai
>> OK, It seems Saul didn't test it when he created utils.py;-)
> 
> I am not quit sure because it is fine when call the deploy image in the 
> hob. little weird.
> 

Probably because another file in the import list includes bb.

However, this change is not specific to the image tool and should be
broken out as a separate patch. utils.py makes calls to bb.utils.which()
on the third source line, so bb should certainly be imported in utils.py.

--
Darren


> Regards,
> Kai
> 
>>
>> --
>> Shane
> 

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




More information about the bitbake-devel mailing list