summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2/osc.py
diff options
context:
space:
mode:
authorAndre McCurdy <armccurdy@gmail.com>2018-06-05 12:13:50 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-06-15 17:57:30 +0100
commit783829427157b82dd021be345fe00afdf4d84a68 (patch)
tree46f95f4f37aabbcb5dc6101f222469cd25c914b6 /bitbake/lib/bb/fetch2/osc.py
parentb054015357b2b03f308af00a41b29c649cbca171 (diff)
downloadpoky-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/osc.py')
-rw-r--r--bitbake/lib/bb/fetch2/osc.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/bitbake/lib/bb/fetch2/osc.py b/bitbake/lib/bb/fetch2/osc.py
index 2b4f7d9c13..6c60456b53 100644
--- a/bitbake/lib/bb/fetch2/osc.py
+++ b/bitbake/lib/bb/fetch2/osc.py
@@ -32,8 +32,9 @@ class Osc(FetchMethod):
32 ud.module = ud.parm["module"] 32 ud.module = ud.parm["module"]
33 33
34 # Create paths to osc checkouts 34 # Create paths to osc checkouts
35 oscdir = d.getVar("OSCDIR") or (d.getVar("DL_DIR") + "/osc")
35 relpath = self._strip_leading_slashes(ud.path) 36 relpath = self._strip_leading_slashes(ud.path)
36 ud.pkgdir = os.path.join(d.getVar('OSCDIR'), ud.host) 37 ud.pkgdir = os.path.join(oscdir, ud.host)
37 ud.moddir = os.path.join(ud.pkgdir, relpath, ud.module) 38 ud.moddir = os.path.join(ud.pkgdir, relpath, ud.module)
38 39
39 if 'rev' in ud.parm: 40 if 'rev' in ud.parm:
@@ -54,7 +55,7 @@ class Osc(FetchMethod):
54 command is "fetch", "update", "info" 55 command is "fetch", "update", "info"
55 """ 56 """
56 57
57 basecmd = d.expand('${FETCHCMD_osc}') 58 basecmd = d.getVar("FETCHCMD_osc") or "/usr/bin/env osc"
58 59
59 proto = ud.parm.get('protocol', 'ocs') 60 proto = ud.parm.get('protocol', 'ocs')
60 61