summaryrefslogtreecommitdiff
path: root/meta/classes/base.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2008-03-10 15:43:39 +0000
committerRichard Purdie <richard@openedhand.com>2008-03-10 15:43:39 +0000
commit570f12e972c971b6c542bee632b7d8e0f0399ea0 (patch)
tree3a7d98616fca66e504f487c44f439c178a87bbe3 /meta/classes/base.bbclass
parentcd11b9ec41cc4cd4d139059ab22d347512934dad (diff)
downloadopenembedded-core-570f12e972c971b6c542bee632b7d8e0f0399ea0.tar.gz
openembedded-core-570f12e972c971b6c542bee632b7d8e0f0399ea0.tar.bz2
openembedded-core-570f12e972c971b6c542bee632b7d8e0f0399ea0.zip
base.bbclass: Let unpack task remove S beforehand which fixes clean handling. Optimise some expand and getVar calls
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3982 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/classes/base.bbclass')
-rw-r--r--meta/classes/base.bbclass11
1 files changed, 7 insertions, 4 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index ed0fced858..f88d32041b 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -1,4 +1,4 @@
-BB_DEFAULT_TASK = "build"
+BB_DEFAULT_TASK ?= "build"
# like os.path.join but doesn't treat absolute RHS specially
def base_path_join(a, *p):
@@ -160,9 +160,9 @@ DEPENDS_prepend="${@base_dep_prepend(d)} "
def base_set_filespath(path, d):
import os, bb
filespath = []
+ # The ":" ensures we have an 'empty' override
+ overrides = (bb.data.getVar("OVERRIDES", d, 1) or "") + ":"
for p in path:
- overrides = bb.data.getVar("OVERRIDES", d, 1) or ""
- overrides = overrides + ":"
for o in overrides.split(":"):
filespath.append(os.path.join(p, o))
return ":".join(filespath)
@@ -585,6 +585,7 @@ def oe_unpack_file(file, data, url = None):
return ret == 0
addtask unpack after do_fetch
+do_unpack[cleandirs] = "${WORKDIR}"
do_unpack[dirs] = "${WORKDIR}"
python base_do_unpack() {
import re, os
@@ -802,8 +803,10 @@ def get_subpkgedata_fn(pkg, d):
import bb, os
archs = bb.data.expand("${PACKAGE_ARCHS}", d).split(" ")
archs.reverse()
+ pkgdata = bb.data.expand('${STAGING_DIR}/pkgdata/', d)
+ targetdir = bb.data.expand('${TARGET_VENDOR}-${TARGET_OS}/runtime/', d)
for arch in archs:
- fn = bb.data.expand('${STAGING_DIR}/pkgdata/' + arch + '${TARGET_VENDOR}-${TARGET_OS}/runtime/%s' % pkg, d)
+ fn = pkgdata + arch + targetdir + pkg
if os.path.exists(fn):
return fn
return bb.data.expand('${PKGDATA_DIR}/runtime/%s' % pkg, d)