]> code.ossystems Code Review - openembedded-core.git/commit
devtool: fix extraction of source to work in memres mode
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Tue, 13 Dec 2016 07:09:41 +0000 (20:09 +1300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 14 Dec 2016 09:56:36 +0000 (09:56 +0000)
commiteb63b5339014fc72ba4829714e0a96a98e135ee2
treeb757f53909d0001bd90146be647ea1f22020fc0c
parenta61d7bf8447b2d2c65eb34315c86086ff35c8bc9
devtool: fix extraction of source to work in memres mode

Extracting the source for a recipe (as used by devtool's extract, modify
and upgrade subcommands) requires us to run do_fetch, do_unpack,
do_patch and any tasks that the recipe has inserted inbetween, and do so
with a modified datastore primarily so that we can redirect WORKDIR and
STAMPS_DIR in order to have the files written out to a place of our
choosing and avoid stamping the tasks as having executed in a real build
context respectively. However, this all gets much more difficult when in
memres mode since we can't call internal functions such as
bb.build.exec_func() directly - instead we need to execute the tasks on
the server. To do this we use the buildFile command which already exists
for the purpose of supporting bitbake -b, and setVariable commands to
set up the appropriate datastore.

(I did look at passing the modified datastore to the buildFile command
instead of using setVar() on the main datastore, however its use of
databuilder makes that very difficult, and we'd also need a different
method of getting the changes in the datastore over to the worker as
well.)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
scripts/lib/devtool/standard.py
scripts/lib/devtool/upgrade.py