1
0
mirror of https://git.yoctoproject.org/poky synced 2026-04-20 11:28:58 +00:00

recipetool: create: reimplement fetching with normal fetch/unpack tasks

Now that we have the ability to run the tasks in a more standard context
through tinfoil, change recipetool's fetching code to use that to fetch
files using it. This has the major advantage that any dependencies of
do_fetch and do_unpack (e.g. for subversion or npm) will be handled
automatically. This also has the beneficial side-effect of fixing a
recent regression that prevented this fetch operation from working with
memory resident bitbake.

Also fix devtool's usage of fetch_uri() at the same time so that we can
completely replace it.

Fixes [YOCTO #11710].

(From OE-Core rev: 9a47a6690052ef943c0d4760630ee630fb012153)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Paul Eggleton
2017-07-20 16:48:11 +02:00
committed by Richard Purdie
parent 7d474e27bc
commit e4346e8be5
4 changed files with 152 additions and 64 deletions

View File

@@ -207,10 +207,16 @@ def _extract_new_source(newpv, srctree, no_patch, srcrev, branch, keep_temp, tin
tmpdir = tempfile.mkdtemp(prefix='devtool')
try:
md5, sha256 = scriptutils.fetch_uri(tinfoil.config_data, uri, tmpdir, rev)
except bb.fetch2.FetchError as e:
checksums, ftmpdir = scriptutils.fetch_url(tinfoil, uri, rev, tmpdir, logger, preserve_tmp=keep_temp)
except scriptutils.FetchUrlFailure as e:
raise DevtoolError(e)
if ftmpdir and keep_temp:
logger.info('Fetch temp directory is %s' % ftmpdir)
md5 = checksums['md5sum']
sha256 = checksums['sha256sum']
tmpsrctree = _get_srctree(tmpdir)
srctree = os.path.abspath(srctree)