summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-04 23:29:51 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-06 23:13:47 +0000
commit8857498ba4a9243fda1b79f2a359ec8e4139c6c3 (patch)
tree8249a5476f8fc0cdc777579c544ec257f4b094ac /bitbake
parent54da82972c21210f76ac93aca7a2a9c8dd61e5e3 (diff)
downloadpoky-8857498ba4a9243fda1b79f2a359ec8e4139c6c3.tar.gz
bitbake: fetch2/osc: Clean up old variable syntax
Since people do copy and paste these things, clean up old syntax styles. (Bitbake rev: 4fb028b0bd14d3e4b3fd7a89c643528728566476) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/fetch2/osc.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/bitbake/lib/bb/fetch2/osc.py b/bitbake/lib/bb/fetch2/osc.py
index 3dfa2a7a72..d051dfdafa 100644
--- a/bitbake/lib/bb/fetch2/osc.py
+++ b/bitbake/lib/bb/fetch2/osc.py
@@ -34,13 +34,13 @@ class Osc(FetchMethod):
34 34
35 # Create paths to osc checkouts 35 # Create paths to osc checkouts
36 relpath = self._strip_leading_slashes(ud.path) 36 relpath = self._strip_leading_slashes(ud.path)
37 ud.pkgdir = os.path.join(data.expand('${OSCDIR}', d), ud.host) 37 ud.pkgdir = os.path.join(d.getVar('OSCDIR', True), ud.host)
38 ud.moddir = os.path.join(ud.pkgdir, relpath, ud.module) 38 ud.moddir = os.path.join(ud.pkgdir, relpath, ud.module)
39 39
40 if 'rev' in ud.parm: 40 if 'rev' in ud.parm:
41 ud.revision = ud.parm['rev'] 41 ud.revision = ud.parm['rev']
42 else: 42 else:
43 pv = data.getVar("PV", d, 0) 43 pv = d.getVar("PV", False)
44 rev = bb.fetch2.srcrev_internal_helper(ud, d) 44 rev = bb.fetch2.srcrev_internal_helper(ud, d)
45 if rev and rev != True: 45 if rev and rev != True:
46 ud.revision = rev 46 ud.revision = rev
@@ -84,7 +84,7 @@ class Osc(FetchMethod):
84 84
85 logger.debug(2, "Fetch: checking for module directory '" + ud.moddir + "'") 85 logger.debug(2, "Fetch: checking for module directory '" + ud.moddir + "'")
86 86
87 if os.access(os.path.join(data.expand('${OSCDIR}', d), ud.path, ud.module), os.R_OK): 87 if os.access(os.path.join(d.getVar('OSCDIR', True), ud.path, ud.module), os.R_OK):
88 oscupdatecmd = self._buildosccommand(ud, d, "update") 88 oscupdatecmd = self._buildosccommand(ud, d, "update")
89 logger.info("Update "+ ud.url) 89 logger.info("Update "+ ud.url)
90 # update sources there 90 # update sources there
@@ -114,7 +114,7 @@ class Osc(FetchMethod):
114 Generate a .oscrc to be used for this run. 114 Generate a .oscrc to be used for this run.
115 """ 115 """
116 116
117 config_path = os.path.join(data.expand('${OSCDIR}', d), "oscrc") 117 config_path = os.path.join(d.getVar('OSCDIR', True), "oscrc")
118 if (os.path.exists(config_path)): 118 if (os.path.exists(config_path)):
119 os.remove(config_path) 119 os.remove(config_path)
120 120
@@ -123,7 +123,7 @@ class Osc(FetchMethod):
123 f.write("apisrv = %s\n" % ud.host) 123 f.write("apisrv = %s\n" % ud.host)
124 f.write("scheme = http\n") 124 f.write("scheme = http\n")
125 f.write("su-wrapper = su -c\n") 125 f.write("su-wrapper = su -c\n")
126 f.write("build-root = %s\n" % data.expand('${WORKDIR}', d)) 126 f.write("build-root = %s\n" % d.getVar('WORKDIR', True))
127 f.write("urllist = %s\n" % d.getVar("OSCURLLIST", True)) 127 f.write("urllist = %s\n" % d.getVar("OSCURLLIST", True))
128 f.write("extra-pkgs = gzip\n") 128 f.write("extra-pkgs = gzip\n")
129 f.write("\n") 129 f.write("\n")