From 570f12e972c971b6c542bee632b7d8e0f0399ea0 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Mon, 10 Mar 2008 15:43:39 +0000 Subject: 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 --- meta/classes/base.bbclass | 11 +++++++---- 1 file 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) -- cgit v1.2.3