fetch2: Correct the clean() mechanism for the fetcher2 code

This create a clean() method in each of the fetcher modules
and correctly cleans the .done stamp file and lock files

Signed-off-by: Saul Wold <sgw@linux.intel.com>
This commit is contained in:
Saul Wold
2011-02-09 14:30:29 -08:00
committed by Richard Purdie
parent f1bbea4ab0
commit 14dea89521
7 changed files with 83 additions and 15 deletions

View File

@@ -170,3 +170,14 @@ class Cvs(Fetch):
except OSError:
pass
raise FetchError(ud.module)
def clean(self, ud, d):
""" clean the git directory """
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)
bb.utils.remove(pkgdir, True)
bb.utils.remove(ud.localpath)