aboutsummaryrefslogtreecommitdiffstats
path: root/classes/base.bbclass
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2008-11-20 20:36:47 +0100
committerKoen Kooi <koen@openembedded.org>2008-11-20 20:36:47 +0100
commit50ed25b113a28eb607c43fcd2788097b8f1613ed (patch)
tree22fe5a84e691d7492dcc9cf6aa4c8f0eb4118978 /classes/base.bbclass
parent73568a36969028a89de0d7da79bb29ca80297e07 (diff)
parent190d7875900a18dc31dd695d02ce52b2c82f8326 (diff)
downloadopenembedded-50ed25b113a28eb607c43fcd2788097b8f1613ed.tar.gz
Merge branch 'org.openembedded.dev' of git@git.openembedded.net:openembedded into org.openembedded.dev
Diffstat (limited to 'classes/base.bbclass')
-rw-r--r--classes/base.bbclass28
1 files changed, 27 insertions, 1 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass
index 10648e9885..00bbffd096 100644
--- a/classes/base.bbclass
+++ b/classes/base.bbclass
@@ -499,6 +499,32 @@ python base_do_mrproper() {
bb.build.exec_func('do_clean', d)
}
+addtask distclean
+do_distclean[dirs] = "${TOPDIR}"
+do_distclean[nostamp] = "1"
+python base_do_distclean() {
+ """clear downloaded sources, build and temp directories"""
+ import os
+
+ bb.build.exec_func('do_clean', d)
+
+ src_uri = bb.data.getVar('SRC_URI', d, 1)
+ if not src_uri:
+ return
+
+ for uri in src_uri.split()
+ if type == "file":
+ continue
+
+ try:
+ local = bb.data.expand(bb.fetch.localpath(uri, d), d)
+ bb.note("removing %s" % local)
+ os.remove(local)
+ os.remove(local + ".md5")
+ except bb.MalformedUrl, e:
+ raise FuncFailed('Unable to generate local path for %s' % e)
+}
+
SCENEFUNCS += "base_scenefunction"
python base_do_setscene () {
@@ -1145,7 +1171,7 @@ inherit patch
# Move to autotools.bbclass?
inherit siteinfo
-EXPORT_FUNCTIONS do_setscene do_clean do_mrproper do_fetch do_unpack do_configure do_compile do_install do_package do_populate_pkgs do_stage do_rebuild do_fetchall
+EXPORT_FUNCTIONS do_setscene do_clean do_mrproper do_distclean do_fetch do_unpack do_configure do_compile do_install do_package do_populate_pkgs do_stage do_rebuild do_fetchall
MIRRORS[func] = "0"
MIRRORS () {