summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2/perforce.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/fetch2/perforce.py')
-rw-r--r--bitbake/lib/bb/fetch2/perforce.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/bitbake/lib/bb/fetch2/perforce.py b/bitbake/lib/bb/fetch2/perforce.py
index 583dfb93bf..e3e9c71da0 100644
--- a/bitbake/lib/bb/fetch2/perforce.py
+++ b/bitbake/lib/bb/fetch2/perforce.py
@@ -79,7 +79,7 @@ class Perforce(FetchMethod):
79 if host: 79 if host:
80 p4opt += " -p %s" % (host) 80 p4opt += " -p %s" % (host)
81 81
82 p4date = data.getVar("P4DATE", d, 1) 82 p4date = data.getVar("P4DATE", d, True)
83 if "revision" in parm: 83 if "revision" in parm:
84 depot += "#%s" % (parm["revision"]) 84 depot += "#%s" % (parm["revision"])
85 elif "label" in parm: 85 elif "label" in parm:
@@ -87,7 +87,7 @@ class Perforce(FetchMethod):
87 elif p4date: 87 elif p4date:
88 depot += "@%s" % (p4date) 88 depot += "@%s" % (p4date)
89 89
90 p4cmd = data.getVar('FETCHCOMMAND_p4', d, 1) 90 p4cmd = data.getVar('FETCHCOMMAND_p4', d, True)
91 logger.debug(1, "Running %s%s changes -m 1 %s", p4cmd, p4opt, depot) 91 logger.debug(1, "Running %s%s changes -m 1 %s", p4cmd, p4opt, depot)
92 p4file = os.popen("%s%s changes -m 1 %s" % (p4cmd, p4opt, depot)) 92 p4file = os.popen("%s%s changes -m 1 %s" % (p4cmd, p4opt, depot))
93 cset = p4file.readline().strip() 93 cset = p4file.readline().strip()
@@ -105,7 +105,7 @@ class Perforce(FetchMethod):
105 105
106 if "label" in parm: 106 if "label" in parm:
107 ud.localfile = "%s.tar.gz" % (parm["label"]) 107 ud.localfile = "%s.tar.gz" % (parm["label"])
108 return os.path.join(data.getVar("DL_DIR", d, 1), ud.localfile) 108 return
109 109
110 base = path 110 base = path
111 which = path.find('/...') 111 which = path.find('/...')
@@ -147,13 +147,13 @@ class Perforce(FetchMethod):
147 if host: 147 if host:
148 p4opt += " -p %s" % (host) 148 p4opt += " -p %s" % (host)
149 149
150 p4cmd = data.getVar('FETCHCOMMAND', localdata, 1) 150 p4cmd = data.getVar('FETCHCOMMAND', localdata, True)
151 151
152 # create temp directory 152 # create temp directory
153 logger.debug(2, "Fetch: creating temporary directory") 153 logger.debug(2, "Fetch: creating temporary directory")
154 bb.mkdirhier(data.expand('${WORKDIR}', localdata)) 154 bb.mkdirhier(data.expand('${WORKDIR}', localdata))
155 data.setVar('TMPBASE', data.expand('${WORKDIR}/oep4.XXXXXX', localdata), localdata) 155 data.setVar('TMPBASE', data.expand('${WORKDIR}/oep4.XXXXXX', localdata), localdata)
156 tmppipe = os.popen(data.getVar('MKTEMPDIRCMD', localdata, 1) or "false") 156 tmppipe = os.popen(data.getVar('MKTEMPDIRCMD', localdata, True) or "false")
157 tmpfile = tmppipe.readline().strip() 157 tmpfile = tmppipe.readline().strip()
158 if not tmpfile: 158 if not tmpfile:
159 raise FetchError("Fetch: unable to create temporary directory.. make sure 'mktemp' is in the PATH.", loc) 159 raise FetchError("Fetch: unable to create temporary directory.. make sure 'mktemp' is in the PATH.", loc)