summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 7491a53600..9329d72779 100644
--- a/bitbake/lib/bb/fetch2/perforce.py
+++ b/bitbake/lib/bb/fetch2/perforce.py
@@ -89,7 +89,7 @@ class Perforce(FetchMethod):
89 elif p4date: 89 elif p4date:
90 depot += "@%s" % (p4date) 90 depot += "@%s" % (p4date)
91 91
92 p4cmd = data.getVar('FETCHCOMMAND_p4', d, True) 92 p4cmd = data.getVar('FETCHCMD_p4', d, True)
93 logger.debug(1, "Running %s%s changes -m 1 %s", p4cmd, p4opt, depot) 93 logger.debug(1, "Running %s%s changes -m 1 %s", p4cmd, p4opt, depot)
94 p4file, errors = bb.process.run("%s%s changes -m 1 %s" % (p4cmd, p4opt, depot)) 94 p4file, errors = bb.process.run("%s%s changes -m 1 %s" % (p4cmd, p4opt, depot))
95 cset = p4file.strip() 95 cset = p4file.strip()
@@ -134,10 +134,6 @@ class Perforce(FetchMethod):
134 134
135 module = parm.get('module', os.path.basename(path)) 135 module = parm.get('module', os.path.basename(path))
136 136
137 localdata = data.createCopy(d)
138 data.setVar('OVERRIDES', "p4:%s" % data.getVar('OVERRIDES', localdata), localdata)
139 data.update_data(localdata)
140
141 # Get the p4 command 137 # Get the p4 command
142 p4opt = "" 138 p4opt = ""
143 if user: 139 if user:
@@ -149,13 +145,13 @@ class Perforce(FetchMethod):
149 if host: 145 if host:
150 p4opt += " -p %s" % (host) 146 p4opt += " -p %s" % (host)
151 147
152 p4cmd = data.getVar('FETCHCOMMAND', localdata, True) 148 p4cmd = data.getVar('FETCHCMD_p4', d, True)
153 149
154 # create temp directory 150 # create temp directory
155 logger.debug(2, "Fetch: creating temporary directory") 151 logger.debug(2, "Fetch: creating temporary directory")
156 bb.utils.mkdirhier(data.expand('${WORKDIR}', localdata)) 152 bb.utils.mkdirhier(d.expand('${WORKDIR}'))
157 data.setVar('TMPBASE', data.expand('${WORKDIR}/oep4.XXXXXX', localdata), localdata) 153 mktemp = d.getVar("FETCHCMD_p4mktemp", True) or d.expand("mktemp -d -q '${WORKDIR}/oep4.XXXXXX'")
158 tmpfile, errors = bb.process.run(data.getVar('MKTEMPDIRCMD', localdata, True) or "false") 154 tmpfile, errors = bb.process.run(mktemp)
159 tmpfile = tmpfile.strip() 155 tmpfile = tmpfile.strip()
160 if not tmpfile: 156 if not tmpfile:
161 raise FetchError("Fetch: unable to create temporary directory.. make sure 'mktemp' is in the PATH.", ud.url) 157 raise FetchError("Fetch: unable to create temporary directory.. make sure 'mktemp' is in the PATH.", ud.url)