mirror of
https://git.yoctoproject.org/poky
synced 2026-04-26 18:32:13 +02:00
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
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user