[OE-core] [PATCH 3/3] devtool: run kernel dependencies

Markus Lehtonen markus.lehtonen at linux.intel.com
Thu Aug 27 14:24:39 UTC 2015


Hi,

On 27/08/15 15:45, "Paul Eggleton" <paul.eggleton at linux.intel.com> wrote:

>Hi Markus,
>
>On Thursday 27 August 2015 14:49:50 Markus Lehtonen wrote:
>> The kernel package needs "kern-tools-native" in order for it's
>> do_kernel_metadata. Thus, devtool extract for kernel in a pristine
>> environment fails. With the current bb.tinfoil implementation it is not
>> possible to run arbitrary bitbake commands - e.g. run
>> "bitbake kern-tools-native -c populate_sysroot" in our case. This patch
>> implements an ugly workaround for that problem, basically by hardcoding
>> this dependency and running the required bitbake task(s) before tinfoil
>> is initialized.
>> 
>> [YOCTO #6658]
>> 
>> Signed-off-by: Markus Lehtonen <markus.lehtonen at linux.intel.com>
>> ---
>>  scripts/lib/devtool/standard.py | 19 ++++++++++++++++++-
>>  1 file changed, 18 insertions(+), 1 deletion(-)
>> 
>> diff --git a/scripts/lib/devtool/standard.py
>> b/scripts/lib/devtool/standard.py index 3725d87..bf24e32 100644
>> --- a/scripts/lib/devtool/standard.py
>> +++ b/scripts/lib/devtool/standard.py
>> @@ -197,6 +197,8 @@ def extract(args, config, basepath, workspace):
>>      """Entry point for the devtool 'extract' subcommand"""
>>      import bb
>> 
>> +    _check_extract_deps(config, basepath, args.recipename)
>> +
>>      tinfoil = setup_tinfoil()
>> 
>>      rd = _parse_recipe(config, tinfoil, args.recipename, True)
>> @@ -237,6 +239,20 @@ class BbTaskExecutor(object):
>>              self.executed.append(func)
>> 
>> 
>> +def _check_extract_deps(config, basepath, recipename):
>> +    """HACK: Ugly workaround for making sure that requirements are met
>>when
>> +       trying to extract a package"""
>> +    tinfoil = setup_tinfoil()
>> +    rd = _parse_recipe(config, tinfoil, recipename, True)
>> +    if bb.data.inherits_class('kernel-yocto', rd):
>> +        tinfoil.shutdown()
>
>Hmm, surely you need to call shutdown() in the non-kernel case as well?
>Otherwise won't the lock still be in place when this function returns and
>then 
>setup_tinfoil() is called a second time?

Argh, I was a bit too hasty with this one. You can find a new version of
this patch attached as well as in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib
marquiz/devtool/kernel
  
http://git.openembedded.org/openembedded-core-contrib/log/?h=marquiz/devtoo
l/kernel



Thanks,
  Markus

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-devtool-run-kernel-dependencies.patch
Type: application/octet-stream
Size: 2956 bytes
Desc: not available
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20150827/e446f971/attachment-0002.obj>


More information about the Openembedded-core mailing list