mirror of
https://git.yoctoproject.org/poky
synced 2026-04-05 08:02:25 +02:00
base.bbclass: Fix PKGDATA to work properly with multimachine
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3238 311d38ba-8fff-0310-9ca6-ca027cbcb966
This commit is contained in:
@@ -747,7 +747,7 @@ def explode_deps(s):
|
||||
|
||||
def packaged(pkg, d):
|
||||
import os, bb
|
||||
return os.access(bb.data.expand('${PKGDATA_DIR}/runtime/%s.packaged' % pkg, d), os.R_OK)
|
||||
return os.access(get_subpkgedata_fn(pkg, d) + '.packaged', os.R_OK)
|
||||
|
||||
def read_pkgdatafile(fn):
|
||||
pkgdata = {}
|
||||
@@ -771,16 +771,23 @@ def read_pkgdatafile(fn):
|
||||
|
||||
return pkgdata
|
||||
|
||||
def get_subpkgedata_fn(pkg, d):
|
||||
import bb, os
|
||||
archs = bb.data.expand("${PACKAGE_ARCHS}", d).split(" ")
|
||||
archs.reverse()
|
||||
for arch in archs:
|
||||
fn = bb.data.expand('${STAGING_DIR}/pkgdata/' + arch + '${TARGET_VENDOR}-${TARGET_OS}/runtime/%s' % pkg, d)
|
||||
if os.path.exists(fn):
|
||||
return fn
|
||||
return bb.data.expand('${PKGDATA_DIR}/runtime/%s' % pkg, d)
|
||||
|
||||
def has_subpkgdata(pkg, d):
|
||||
import bb, os
|
||||
fn = bb.data.expand('${PKGDATA_DIR}/runtime/%s' % pkg, d)
|
||||
return os.access(fn, os.R_OK)
|
||||
return os.access(get_subpkgedata_fn(pkg, d), os.R_OK)
|
||||
|
||||
def read_subpkgdata(pkg, d):
|
||||
import bb, os
|
||||
fn = bb.data.expand('${PKGDATA_DIR}/runtime/%s' % pkg, d)
|
||||
return read_pkgdatafile(fn)
|
||||
|
||||
return read_pkgdatafile(get_subpkgedata_fn(pkg, d))
|
||||
|
||||
def has_pkgdata(pn, d):
|
||||
import bb, os
|
||||
|
||||
Reference in New Issue
Block a user