diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2017-07-20 16:48:11 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-07-21 08:44:25 +0100 |
commit | e4346e8be5f451d5cfe0b68a272abd15b0951831 (patch) | |
tree | fee60446d4319e5e771c2e809fc8a21278d00983 /scripts/lib/devtool | |
parent | 7d474e27bc851b22b7c00ace66ac40ea45588054 (diff) | |
download | poky-e4346e8be5f451d5cfe0b68a272abd15b0951831.tar.gz |
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>
Diffstat (limited to 'scripts/lib/devtool')
-rw-r--r-- | scripts/lib/devtool/upgrade.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/scripts/lib/devtool/upgrade.py b/scripts/lib/devtool/upgrade.py index 05fb9e5ed0..f077f37726 100644 --- a/scripts/lib/devtool/upgrade.py +++ b/scripts/lib/devtool/upgrade.py | |||
@@ -207,10 +207,16 @@ def _extract_new_source(newpv, srctree, no_patch, srcrev, branch, keep_temp, tin | |||
207 | 207 | ||
208 | tmpdir = tempfile.mkdtemp(prefix='devtool') | 208 | tmpdir = tempfile.mkdtemp(prefix='devtool') |
209 | try: | 209 | try: |
210 | md5, sha256 = scriptutils.fetch_uri(tinfoil.config_data, uri, tmpdir, rev) | 210 | checksums, ftmpdir = scriptutils.fetch_url(tinfoil, uri, rev, tmpdir, logger, preserve_tmp=keep_temp) |
211 | except bb.fetch2.FetchError as e: | 211 | except scriptutils.FetchUrlFailure as e: |
212 | raise DevtoolError(e) | 212 | raise DevtoolError(e) |
213 | 213 | ||
214 | if ftmpdir and keep_temp: | ||
215 | logger.info('Fetch temp directory is %s' % ftmpdir) | ||
216 | |||
217 | md5 = checksums['md5sum'] | ||
218 | sha256 = checksums['sha256sum'] | ||
219 | |||
214 | tmpsrctree = _get_srctree(tmpdir) | 220 | tmpsrctree = _get_srctree(tmpdir) |
215 | srctree = os.path.abspath(srctree) | 221 | srctree = os.path.abspath(srctree) |
216 | 222 | ||