summaryrefslogtreecommitdiff
path: root/meta/classes/base.bbclass
diff options
context:
space:
mode:
authorSaul Wold <sgw@linux.intel.com>2011-02-09 14:30:29 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-02-10 23:49:25 +0000
commit14dea89521c0c648e8e543388096a6dcd6d4f2e0 (patch)
treeddb73f19d8eeaa659905968ee1de28b9750b5628 /meta/classes/base.bbclass
parentf1bbea4ab0c41cf93cd1a2d0d4d05a4ad06a0728 (diff)
downloadopenembedded-core-14dea89521c0c648e8e543388096a6dcd6d4f2e0.tar.gz
openembedded-core-14dea89521c0c648e8e543388096a6dcd6d4f2e0.tar.bz2
openembedded-core-14dea89521c0c648e8e543388096a6dcd6d4f2e0.zip
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>
Diffstat (limited to 'meta/classes/base.bbclass')
-rw-r--r--meta/classes/base.bbclass24
1 files changed, 9 insertions, 15 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index edb65eb96b..e4ea69d481 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -464,24 +464,18 @@ addtask cleanall after do_clean
python do_cleanall() {
sstate_clean_cachefiles(d)
+ src_uri = (bb.data.getVar('SRC_URI', d, True) or "").split()
+ if len(src_uri) == 0:
+ return
+
localdata = bb.data.createCopy(d)
bb.data.update_data(localdata)
- dl_dir = bb.data.getVar('DL_DIR', localdata, True)
- dl_dir = os.path.realpath(dl_dir)
-
- src_uri = (bb.data.getVar('SRC_URI', localdata, True) or "").split()
- if len(src_uri) == 0:
- return
- fetcher = bb.fetch2.Fetch(src_uri, localdata)
- for url in src_uri:
- local = fetcher.localpath(url)
- if local is None:
- continue
- local = os.path.realpath(local)
- if local.startswith(dl_dir):
- bb.note("Removing %s*" % local)
- oe.path.remove(local + "*")
+ try:
+ fetcher = bb.fetch2.Fetch(src_uri, localdata)
+ fetcher.clean()
+ except bb.fetch2.BBFetchException, e:
+ raise bb.build.FuncFailed(e)
}
do_cleanall[nostamp] = "1"