summaryrefslogtreecommitdiffstats
path: root/meta/classes
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
parentcd11b9ec41cc4cd4d139059ab22d347512934dad (diff)
downloadpoky-570f12e972c971b6c542bee632b7d8e0f0399ea0.tar.gz
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')
-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 @@
1BB_DEFAULT_TASK = "build" 1BB_DEFAULT_TASK ?= "build"
2 2
3# like os.path.join but doesn't treat absolute RHS specially 3# like os.path.join but doesn't treat absolute RHS specially
4def base_path_join(a, *p): 4def base_path_join(a, *p):
@@ -160,9 +160,9 @@ DEPENDS_prepend="${@base_dep_prepend(d)} "
160def base_set_filespath(path, d): 160def base_set_filespath(path, d):
161 import os, bb 161 import os, bb
162 filespath = [] 162 filespath = []
163 # The ":" ensures we have an 'empty' override
164 overrides = (bb.data.getVar("OVERRIDES", d, 1) or "") + ":"
163 for p in path: 165 for p in path:
164 overrides = bb.data.getVar("OVERRIDES", d, 1) or ""
165 overrides = overrides + ":"
166 for o in overrides.split(":"): 166 for o in overrides.split(":"):
167 filespath.append(os.path.join(p, o)) 167 filespath.append(os.path.join(p, o))
168 return ":".join(filespath) 168 return ":".join(filespath)
@@ -585,6 +585,7 @@ def oe_unpack_file(file, data, url = None):
585 return ret == 0 585 return ret == 0
586 586
587addtask unpack after do_fetch 587addtask unpack after do_fetch
588do_unpack[cleandirs] = "${WORKDIR}"
588do_unpack[dirs] = "${WORKDIR}" 589do_unpack[dirs] = "${WORKDIR}"
589python base_do_unpack() { 590python base_do_unpack() {
590 import re, os 591 import re, os
@@ -802,8 +803,10 @@ def get_subpkgedata_fn(pkg, d):
802 import bb, os 803 import bb, os
803 archs = bb.data.expand("${PACKAGE_ARCHS}", d).split(" ") 804 archs = bb.data.expand("${PACKAGE_ARCHS}", d).split(" ")
804 archs.reverse() 805 archs.reverse()
806 pkgdata = bb.data.expand('${STAGING_DIR}/pkgdata/', d)
807 targetdir = bb.data.expand('${TARGET_VENDOR}-${TARGET_OS}/runtime/', d)
805 for arch in archs: 808 for arch in archs:
806 fn = bb.data.expand('${STAGING_DIR}/pkgdata/' + arch + '${TARGET_VENDOR}-${TARGET_OS}/runtime/%s' % pkg, d) 809 fn = pkgdata + arch + targetdir + pkg
807 if os.path.exists(fn): 810 if os.path.exists(fn):
808 return fn 811 return fn
809 return bb.data.expand('${PKGDATA_DIR}/runtime/%s' % pkg, d) 812 return bb.data.expand('${PKGDATA_DIR}/runtime/%s' % pkg, d)