summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2/cvs.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/fetch2/cvs.py')
-rw-r--r--bitbake/lib/bb/fetch2/cvs.py20
1 files changed, 8 insertions, 12 deletions
diff --git a/bitbake/lib/bb/fetch2/cvs.py b/bitbake/lib/bb/fetch2/cvs.py
index 09827e6053..0a014d1e9e 100644
--- a/bitbake/lib/bb/fetch2/cvs.py
+++ b/bitbake/lib/bb/fetch2/cvs.py
@@ -29,7 +29,6 @@ BitBake build tools.
29import os 29import os
30import logging 30import logging
31import bb 31import bb
32from bb import data
33from bb.fetch2 import FetchMethod, FetchError, MissingParameterError, logger 32from bb.fetch2 import FetchMethod, FetchError, MissingParameterError, logger
34from bb.fetch2 import runfetchcmd 33from bb.fetch2 import runfetchcmd
35 34
@@ -64,7 +63,7 @@ class Cvs(FetchMethod):
64 if 'fullpath' in ud.parm: 63 if 'fullpath' in ud.parm:
65 fullpath = '_fullpath' 64 fullpath = '_fullpath'
66 65
67 ud.localfile = data.expand('%s_%s_%s_%s%s%s.tar.gz' % (ud.module.replace('/', '.'), ud.host, ud.tag, ud.date, norecurse, fullpath), d) 66 ud.localfile = bb.data.expand('%s_%s_%s_%s%s%s.tar.gz' % (ud.module.replace('/', '.'), ud.host, ud.tag, ud.date, norecurse, fullpath), d)
68 67
69 def need_update(self, url, ud, d): 68 def need_update(self, url, ud, d):
70 if (ud.date == "now"): 69 if (ud.date == "now"):
@@ -88,10 +87,10 @@ class Cvs(FetchMethod):
88 cvsroot = ud.path 87 cvsroot = ud.path
89 else: 88 else:
90 cvsroot = ":" + method 89 cvsroot = ":" + method
91 cvsproxyhost = data.getVar('CVS_PROXY_HOST', d, True) 90 cvsproxyhost = d.getVar('CVS_PROXY_HOST', True)
92 if cvsproxyhost: 91 if cvsproxyhost:
93 cvsroot += ";proxy=" + cvsproxyhost 92 cvsroot += ";proxy=" + cvsproxyhost
94 cvsproxyport = data.getVar('CVS_PROXY_PORT', d, True) 93 cvsproxyport = d.getVar('CVS_PROXY_PORT', True)
95 if cvsproxyport: 94 if cvsproxyport:
96 cvsroot += ";proxyport=" + cvsproxyport 95 cvsroot += ";proxyport=" + cvsproxyport
97 cvsroot += ":" + ud.user 96 cvsroot += ":" + ud.user
@@ -121,8 +120,8 @@ class Cvs(FetchMethod):
121 120
122 # create module directory 121 # create module directory
123 logger.debug(2, "Fetch: checking for module directory") 122 logger.debug(2, "Fetch: checking for module directory")
124 pkg = data.expand('${PN}', d) 123 pkg = d.getVar('PN', True)
125 pkgdir = os.path.join(data.expand('${CVSDIR}', d), pkg) 124 pkgdir = os.path.join(d.getVar('CVSDIR', True), pkg)
126 moddir = os.path.join(pkgdir, localdir) 125 moddir = os.path.join(pkgdir, localdir)
127 if os.access(os.path.join(moddir, 'CVS'), os.R_OK): 126 if os.access(os.path.join(moddir, 'CVS'), os.R_OK):
128 logger.info("Update " + loc) 127 logger.info("Update " + loc)
@@ -163,12 +162,9 @@ class Cvs(FetchMethod):
163 162
164 def clean(self, ud, d): 163 def clean(self, ud, d):
165 """ Clean CVS Files and tarballs """ 164 """ Clean CVS Files and tarballs """
166 165
167 pkg = data.expand('${PN}', d) 166 pkg = d.getVar('PN', True)
168 localdata = data.createCopy(d) 167 pkgdir = os.path.join(d.getVar("CVSDIR", True), pkg)
169 data.setVar('OVERRIDES', "cvs:%s" % data.getVar('OVERRIDES', localdata), localdata)
170 data.update_data(localdata)
171 pkgdir = os.path.join(data.expand('${CVSDIR}', localdata), pkg)
172 168
173 bb.utils.remove(pkgdir, True) 169 bb.utils.remove(pkgdir, True)
174 bb.utils.remove(ud.localpath) 170 bb.utils.remove(ud.localpath)