From 783829427157b82dd021be345fe00afdf4d84a68 Mon Sep 17 00:00:00 2001 From: Andre McCurdy Date: Tue, 5 Jun 2018 12:13:50 -0700 Subject: 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 Signed-off-by: Richard Purdie --- bitbake/lib/bb/fetch2/perforce.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'bitbake/lib/bb/fetch2/perforce.py') diff --git a/bitbake/lib/bb/fetch2/perforce.py b/bitbake/lib/bb/fetch2/perforce.py index 3debad59f4..903a8e61ae 100644 --- a/bitbake/lib/bb/fetch2/perforce.py +++ b/bitbake/lib/bb/fetch2/perforce.py @@ -43,13 +43,9 @@ class Perforce(FetchMethod): provided by the env, use it. If P4PORT is specified by the recipe, use its values, which may override the settings in P4CONFIG. """ - ud.basecmd = d.getVar('FETCHCMD_p4') - if not ud.basecmd: - ud.basecmd = "/usr/bin/env p4" + ud.basecmd = d.getVar("FETCHCMD_p4") or "/usr/bin/env p4" - ud.dldir = d.getVar('P4DIR') - if not ud.dldir: - ud.dldir = '%s/%s' % (d.getVar('DL_DIR'), 'p4') + ud.dldir = d.getVar("P4DIR") or (d.getVar("DL_DIR") + "/p4") path = ud.url.split('://')[1] path = path.split(';')[0] -- cgit v1.2.3-54-g00ecf