summaryrefslogtreecommitdiffstats
path: root/meta/classes/base.bbclass
diff options
context:
space:
mode:
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
464python do_cleanall() { 464python do_cleanall() {
465 sstate_clean_cachefiles(d) 465 sstate_clean_cachefiles(d)
466 466
467 src_uri = (bb.data.getVar('SRC_URI', d, True) or "").split()
468 if len(src_uri) == 0:
469 return
470
467 localdata = bb.data.createCopy(d) 471 localdata = bb.data.createCopy(d)
468 bb.data.update_data(localdata) 472 bb.data.update_data(localdata)
469 473
470 dl_dir = bb.data.getVar('DL_DIR', localdata, True) 474 try:
471 dl_dir = os.path.realpath(dl_dir) 475 fetcher = bb.fetch2.Fetch(src_uri, localdata)
472 476 fetcher.clean()
473 src_uri = (bb.data.getVar('SRC_URI', localdata, True) or "").split() 477 except bb.fetch2.BBFetchException, e:
474 if len(src_uri) == 0: 478 raise bb.build.FuncFailed(e)
475 return
476 fetcher = bb.fetch2.Fetch(src_uri, localdata)
477 for url in src_uri:
478 local = fetcher.localpath(url)
479 if local is None:
480 continue
481 local = os.path.realpath(local)
482 if local.startswith(dl_dir):
483 bb.note("Removing %s*" % local)
484 oe.path.remove(local + "*")
485} 479}
486do_cleanall[nostamp] = "1" 480do_cleanall[nostamp] = "1"
487 481