diff options
| author | Andre McCurdy <armccurdy@gmail.com> | 2018-06-05 12:13:50 -0700 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-06-15 17:57:30 +0100 |
| commit | 783829427157b82dd021be345fe00afdf4d84a68 (patch) | |
| tree | 46f95f4f37aabbcb5dc6101f222469cd25c914b6 /bitbake/lib/bb/fetch2/bzr.py | |
| parent | b054015357b2b03f308af00a41b29c649cbca171 (diff) | |
| download | poky-783829427157b82dd021be345fe00afdf4d84a68.tar.gz | |
bitbake: fetch2: unify the way fetchers determine DL_DIR and FETCHCMD
Currently there is quite some variation between the fetchers in terms
of how they determine the subdirectory within DL_DIR and the base
fetch command to run. Some rely on variables being set externally
(e.g. from bitbake.conf in oe-core), some respect these external
variables but provide fallback defaults and some use only hardcoded
internal values. Try to unify the approach used across the various
fetchers.
(Bitbake rev: efd5e35af4b08501c67e8b30f30d9457f6fdf610)
Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2/bzr.py')
| -rw-r--r-- | bitbake/lib/bb/fetch2/bzr.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bitbake/lib/bb/fetch2/bzr.py b/bitbake/lib/bb/fetch2/bzr.py index 16123f8af9..658502f9a6 100644 --- a/bitbake/lib/bb/fetch2/bzr.py +++ b/bitbake/lib/bb/fetch2/bzr.py | |||
| @@ -41,8 +41,9 @@ class Bzr(FetchMethod): | |||
| 41 | init bzr specific variable within url data | 41 | init bzr specific variable within url data |
| 42 | """ | 42 | """ |
| 43 | # Create paths to bzr checkouts | 43 | # Create paths to bzr checkouts |
| 44 | bzrdir = d.getVar("BZRDIR") or (d.getVar("DL_DIR") + "/bzr") | ||
| 44 | relpath = self._strip_leading_slashes(ud.path) | 45 | relpath = self._strip_leading_slashes(ud.path) |
| 45 | ud.pkgdir = os.path.join(d.expand('${BZRDIR}'), ud.host, relpath) | 46 | ud.pkgdir = os.path.join(bzrdir, ud.host, relpath) |
| 46 | 47 | ||
| 47 | ud.setup_revisions(d) | 48 | ud.setup_revisions(d) |
| 48 | 49 | ||
| @@ -57,7 +58,7 @@ class Bzr(FetchMethod): | |||
| 57 | command is "fetch", "update", "revno" | 58 | command is "fetch", "update", "revno" |
| 58 | """ | 59 | """ |
| 59 | 60 | ||
| 60 | basecmd = d.expand('${FETCHCMD_bzr}') | 61 | basecmd = d.getVar("FETCHCMD_bzr") or "/usr/bin/env bzr" |
| 61 | 62 | ||
| 62 | proto = ud.parm.get('protocol', 'http') | 63 | proto = ud.parm.get('protocol', 'http') |
| 63 | 64 | ||
