[bitbake-devel] fetch/svk: Drop usage of old style *COMMAND variable and MKTEMPDIRCMD

Submitted by Richard Purdie on Feb. 28, 2014, 5:24 p.m.


Message ID 1393608264.31769.201.camel@ted
State New
Headers show

Commit Message

Richard Purdie Feb. 28, 2014, 5:24 p.m.
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

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

Patch hide | download patch | download mbox

diff --git a/bitbake/lib/bb/fetch2/svk.py b/bitbake/lib/bb/fetch2/svk.py
index 23631b4..6f70a3b 100644
--- a/bitbake/lib/bb/fetch2/svk.py
+++ b/bitbake/lib/bb/fetch2/svk.py
@@ -72,12 +72,10 @@  class Svk(FetchMethod):
             svkcmd = "svk co -r %s %s/%s" % (ud.revision, svkroot, ud.module)
         # create temp directory
-        localdata = data.createCopy(d)
-        data.update_data(localdata)
         logger.debug(2, "Fetch: creating temporary directory")
-        bb.utils.mkdirhier(data.expand('${WORKDIR}', localdata))
-        data.setVar('TMPBASE', data.expand('${WORKDIR}/oesvk.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_svkmktemp", True) or d.expand("mktemp -d -q '${WORKDIR}/oesvk.XXXXXX'")
+        tmpfile, errors = bb.process.run(mktemp)
         tmpfile = tmpfile.strip()
         if not tmpfile: