diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-09-20 11:32:02 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-09-20 11:37:16 +0100 |
commit | 01606f2b97381164c4b672effaff30fe11af0ea3 (patch) | |
tree | 12902632f76958c9d138f8f1f43b053fa8a6868e /bitbake | |
parent | 553a5b184282a11100277c840a0d61d6d0921fff (diff) | |
download | ast2050-yocto-poky-01606f2b97381164c4b672effaff30fe11af0ea3.zip ast2050-yocto-poky-01606f2b97381164c4b672effaff30fe11af0ea3.tar.gz |
bitbake: fetch2/cvs: Clean up various data store references
The code in the CVS fetcher is elderly and there are simpler ways of
using the data store. This updates to use the modern APIs.
(Bitbake rev: 78eee8c70a80997293df99475153aed0b2ad0a17)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/fetch2/cvs.py | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/bitbake/lib/bb/fetch2/cvs.py b/bitbake/lib/bb/fetch2/cvs.py index 09827e6..0a014d1 100644 --- a/bitbake/lib/bb/fetch2/cvs.py +++ b/bitbake/lib/bb/fetch2/cvs.py @@ -29,7 +29,6 @@ BitBake build tools. import os import logging import bb -from bb import data from bb.fetch2 import FetchMethod, FetchError, MissingParameterError, logger from bb.fetch2 import runfetchcmd @@ -64,7 +63,7 @@ class Cvs(FetchMethod): if 'fullpath' in ud.parm: fullpath = '_fullpath' - ud.localfile = data.expand('%s_%s_%s_%s%s%s.tar.gz' % (ud.module.replace('/', '.'), ud.host, ud.tag, ud.date, norecurse, fullpath), d) + 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) def need_update(self, url, ud, d): if (ud.date == "now"): @@ -88,10 +87,10 @@ class Cvs(FetchMethod): cvsroot = ud.path else: cvsroot = ":" + method - cvsproxyhost = data.getVar('CVS_PROXY_HOST', d, True) + cvsproxyhost = d.getVar('CVS_PROXY_HOST', True) if cvsproxyhost: cvsroot += ";proxy=" + cvsproxyhost - cvsproxyport = data.getVar('CVS_PROXY_PORT', d, True) + cvsproxyport = d.getVar('CVS_PROXY_PORT', True) if cvsproxyport: cvsroot += ";proxyport=" + cvsproxyport cvsroot += ":" + ud.user @@ -121,8 +120,8 @@ class Cvs(FetchMethod): # create module directory logger.debug(2, "Fetch: checking for module directory") - pkg = data.expand('${PN}', d) - pkgdir = os.path.join(data.expand('${CVSDIR}', d), pkg) + pkg = d.getVar('PN', True) + pkgdir = os.path.join(d.getVar('CVSDIR', True), pkg) moddir = os.path.join(pkgdir, localdir) if os.access(os.path.join(moddir, 'CVS'), os.R_OK): logger.info("Update " + loc) @@ -163,12 +162,9 @@ class Cvs(FetchMethod): def clean(self, ud, d): """ Clean CVS Files and tarballs """ - - pkg = data.expand('${PN}', d) - localdata = data.createCopy(d) - data.setVar('OVERRIDES', "cvs:%s" % data.getVar('OVERRIDES', localdata), localdata) - data.update_data(localdata) - pkgdir = os.path.join(data.expand('${CVSDIR}', localdata), pkg) + + pkg = d.getVar('PN', True) + pkgdir = os.path.join(d.getVar("CVSDIR", True), pkg) bb.utils.remove(pkgdir, True) bb.utils.remove(ud.localpath) |