mirror of
https://git.yoctoproject.org/poky
synced 2026-06-01 00:59:48 +00: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):
|
def packaged(pkg, d):
|
||||||
import os, bb
|
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):
|
def read_pkgdatafile(fn):
|
||||||
pkgdata = {}
|
pkgdata = {}
|
||||||
@@ -771,16 +771,23 @@ def read_pkgdatafile(fn):
|
|||||||
|
|
||||||
return pkgdata
|
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):
|
def has_subpkgdata(pkg, d):
|
||||||
import bb, os
|
import bb, os
|
||||||
fn = bb.data.expand('${PKGDATA_DIR}/runtime/%s' % pkg, d)
|
return os.access(get_subpkgedata_fn(pkg, d), os.R_OK)
|
||||||
return os.access(fn, os.R_OK)
|
|
||||||
|
|
||||||
def read_subpkgdata(pkg, d):
|
def read_subpkgdata(pkg, d):
|
||||||
import bb, os
|
import bb, os
|
||||||
fn = bb.data.expand('${PKGDATA_DIR}/runtime/%s' % pkg, d)
|
return read_pkgdatafile(get_subpkgedata_fn(pkg, d))
|
||||||
return read_pkgdatafile(fn)
|
|
||||||
|
|
||||||
|
|
||||||
def has_pkgdata(pn, d):
|
def has_pkgdata(pn, d):
|
||||||
import bb, os
|
import bb, os
|
||||||
|
|||||||
Reference in New Issue
Block a user