diff options
author | Richard Purdie <rpurdie@rpsys.net> | 2007-12-01 18:24:01 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@rpsys.net> | 2007-12-01 18:24:01 +0000 |
commit | c68559d0bf023bae14033ae60d7dffaf1bc4afb6 (patch) | |
tree | f6e8ff2678978aa277307e1c97c37241d03f3aa4 /classes/base.bbclass | |
parent | 3c4ca2014c1db7f76ebbdad0264005aaa92dc3f9 (diff) |
base.bbclass: Improve pkgdata handling functions so all PACKAGE_ARCHS are searched (in order) when locating package data. This fixes handling of packages with split package archs like sysvinit. (from poky)
Diffstat (limited to 'classes/base.bbclass')
-rw-r--r-- | classes/base.bbclass | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass index 1794382699..7526dff65e 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -315,7 +315,9 @@ oe_libinstall() { # stop libtool using the final directory name for libraries # in staging: __runcmd rm -f $destpath/$libname.la - __runcmd sed -e 's/^installed=yes$/installed=no/' -e '/^dependency_libs=/s,${WORKDIR}[[:alnum:]/\._+-]*/\([[:alnum:]\._+-]*\),${STAGING_LIBDIR}/\1,g' $dotlai >$destpath/$libname.la + __runcmd sed -e 's/^installed=yes$/installed=no/' \ + -e '/^dependency_libs=/s,${WORKDIR}[[:alnum:]/\._+-]*/\([[:alnum:]\._+-]*\),${STAGING_LIBDIR}/\1,g' \ + $dotlai >$destpath/$libname.la else __runcmd install -m 0644 $dotlai $destpath/$libname.la fi @@ -702,7 +704,7 @@ do_populate_staging[dirs] = "${STAGING_DIR_TARGET}/${layout_bindir} ${STAGING_DI addtask populate_staging after do_install python do_populate_staging () { - bb.build.exec_func('do_stage', d) + bb.build.exec_func('do_stage', d) } addtask install after do_compile @@ -744,7 +746,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 = {} @@ -768,16 +770,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 |