summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2014-02-28 17:23:45 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-03-02 17:25:29 +0000
commitc547149cae38a6e45255b6be74d8ea2dc8a8b1bd (patch)
treec95ebe2925038baea33b56f348d83f0fd625109d /bitbake/lib/bb/fetch2
parent1aab9c797d4743f13682c6472e21da0a536056e6 (diff)
downloadast2050-yocto-poky-c547149cae38a6e45255b6be74d8ea2dc8a8b1bd.zip
ast2050-yocto-poky-c547149cae38a6e45255b6be74d8ea2dc8a8b1bd.tar.gz
bitbake: fetch/perforce: Drop usage of old style *COMMAND variable and MKTEMPDIRCMD
Clean up some horrible old code and drop usage of the old style *COMMAND variable and MKTEMPDIRCMD whilst in here. This means we don't need to touch OVERRIDES either. (Bitbake rev: 6b79789769da160d0e7fca0f9c6044dc1e11a107) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2')
-rw-r--r--bitbake/lib/bb/fetch2/perforce.py14
1 files changed, 5 insertions, 9 deletions
diff --git a/bitbake/lib/bb/fetch2/perforce.py b/bitbake/lib/bb/fetch2/perforce.py
index 7491a53..9329d72 100644
--- a/bitbake/lib/bb/fetch2/perforce.py
+++ b/bitbake/lib/bb/fetch2/perforce.py
@@ -89,7 +89,7 @@ class Perforce(FetchMethod):
elif p4date:
depot += "@%s" % (p4date)
- p4cmd = data.getVar('FETCHCOMMAND_p4', d, True)
+ p4cmd = data.getVar('FETCHCMD_p4', d, True)
logger.debug(1, "Running %s%s changes -m 1 %s", p4cmd, p4opt, depot)
p4file, errors = bb.process.run("%s%s changes -m 1 %s" % (p4cmd, p4opt, depot))
cset = p4file.strip()
@@ -134,10 +134,6 @@ class Perforce(FetchMethod):
module = parm.get('module', os.path.basename(path))
- localdata = data.createCopy(d)
- data.setVar('OVERRIDES', "p4:%s" % data.getVar('OVERRIDES', localdata), localdata)
- data.update_data(localdata)
-
# Get the p4 command
p4opt = ""
if user:
@@ -149,13 +145,13 @@ class Perforce(FetchMethod):
if host:
p4opt += " -p %s" % (host)
- p4cmd = data.getVar('FETCHCOMMAND', localdata, True)
+ p4cmd = data.getVar('FETCHCMD_p4', d, True)
# create temp directory
logger.debug(2, "Fetch: creating temporary directory")
- bb.utils.mkdirhier(data.expand('${WORKDIR}', localdata))
- data.setVar('TMPBASE', data.expand('${WORKDIR}/oep4.XXXXXX', localdata), localdata)
- tmpfile, errors = bb.process.run(data.getVar('MKTEMPDIRCMD', localdata, True) or "false")
+ bb.utils.mkdirhier(d.expand('${WORKDIR}'))
+ mktemp = d.getVar("FETCHCMD_p4mktemp", True) or d.expand("mktemp -d -q '${WORKDIR}/oep4.XXXXXX'")
+ tmpfile, errors = bb.process.run(mktemp)
tmpfile = tmpfile.strip()
if not tmpfile:
raise FetchError("Fetch: unable to create temporary directory.. make sure 'mktemp' is in the PATH.", ud.url)
OpenPOWER on IntegriCloud