diff options
author | Joshua Lock <josh@linux.intel.com> | 2010-02-26 12:33:34 +0000 |
---|---|---|
committer | Joshua Lock <josh@linux.intel.com> | 2010-02-26 12:33:34 +0000 |
commit | cb8ae04ebe34bbd81ff1fc91a124dc7e0712c049 (patch) | |
tree | e311baaf74ac878fea117ce47005dc6c8eb6f2a8 | |
parent | fce742aac60051d72d21e7ffa53e5661245793d5 (diff) | |
download | poky-cb8ae04ebe34bbd81ff1fc91a124dc7e0712c049.tar.gz |
packaged-staging: post-process non-binary files to fix paths in native packages
Extend the existing libtool hack so that native packages (native, cross, sdk)
have all non-binary files scanned and the STAGING_DIR fixed up.
Signed-off-by: Joshua Lock <josh@linux.intel.com>
-rw-r--r-- | meta/classes/packaged-staging.bbclass | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/meta/classes/packaged-staging.bbclass b/meta/classes/packaged-staging.bbclass index 4789ecc3b1..84ee734928 100644 --- a/meta/classes/packaged-staging.bbclass +++ b/meta/classes/packaged-staging.bbclass | |||
@@ -19,6 +19,7 @@ PSTAGE_PKGPN = "${@bb.data.expand('staging-${PN}-${MULTIMACH_ARCH}${TARGET_ | |||
19 | PSTAGE_PKGNAME = "${PSTAGE_PKGPN}_${PSTAGE_PKGVERSION}_${PSTAGE_PKGARCH}.ipk" | 19 | PSTAGE_PKGNAME = "${PSTAGE_PKGPN}_${PSTAGE_PKGVERSION}_${PSTAGE_PKGARCH}.ipk" |
20 | PSTAGE_PKG = "${PSTAGE_DIR}/${PSTAGE_PKGPATH}/${PSTAGE_PKGNAME}" | 20 | PSTAGE_PKG = "${PSTAGE_DIR}/${PSTAGE_PKGPATH}/${PSTAGE_PKGNAME}" |
21 | PSTAGE_WORKDIR = "${TMPDIR}/pstage" | 21 | PSTAGE_WORKDIR = "${TMPDIR}/pstage" |
22 | PSTAGE_SCAN_CMD ?= "find ${PSTAGE_TMPDIR_STAGE} -name "*.la" -type f" | ||
22 | 23 | ||
23 | PSTAGE_NATIVEDEPENDS = "\ | 24 | PSTAGE_NATIVEDEPENDS = "\ |
24 | shasum-native \ | 25 | shasum-native \ |
@@ -36,6 +37,8 @@ python () { | |||
36 | path = bb.data.getVar('PSTAGE_PKGPATH', d, 1) | 37 | path = bb.data.getVar('PSTAGE_PKGPATH', d, 1) |
37 | path = path + bb.data.getVar('TMPDIR', d, 1).replace('/', '-') | 38 | path = path + bb.data.getVar('TMPDIR', d, 1).replace('/', '-') |
38 | bb.data.setVar('PSTAGE_PKGPATH', path, d) | 39 | bb.data.setVar('PSTAGE_PKGPATH', path, d) |
40 | scan_cmd = "qrep -Irl ${STAGING_DIR} ${PSTAGE_TMDPDIR_STAGE}" | ||
41 | bb.data.setVar('PSTAGE_SCAN_CMD', scan_cmd, d) | ||
39 | 42 | ||
40 | # PSTAGE_NATIVEDEPENDS lists the packages we need before we can use packaged | 43 | # PSTAGE_NATIVEDEPENDS lists the packages we need before we can use packaged |
41 | # staging. There will always be some packages we depend on. | 44 | # staging. There will always be some packages we depend on. |
@@ -356,8 +359,9 @@ staging_packager () { | |||
356 | # Need to remove hardcoded paths and fix these when we install the | 359 | # Need to remove hardcoded paths and fix these when we install the |
357 | # staging packages. | 360 | # staging packages. |
358 | # Could someone please add sysroot support to libtool! | 361 | # Could someone please add sysroot support to libtool! |
359 | for i in `find ${PSTAGE_TMPDIR_STAGE} -name "*.la" -type f` ; do \ | 362 | for i in `${PSTAGE_SCAN_CMD}` ; do \ |
360 | sed -i -e s:${STAGING_DIR}:FIXMESTAGINGDIR:g $i | 363 | sed -i -e s:${STAGING_DIR}:FIXMESTAGINGDIR:g $i |
364 | echo $i | sed -e 's:${PSTAGE_TMPDIR_STAGE}/::' >> ${PSTAGE_TMPDIR_STAGE}/sysroots/fixmepath | ||
361 | done | 365 | done |
362 | 366 | ||
363 | ${PSTAGE_BUILD_CMD} ${PSTAGE_TMPDIR_STAGE} ${PSTAGE_DIR}/${PSTAGE_PKGPATH} | 367 | ${PSTAGE_BUILD_CMD} ${PSTAGE_TMPDIR_STAGE} ${PSTAGE_DIR}/${PSTAGE_PKGPATH} |
@@ -382,12 +386,21 @@ staging_package_installer () { | |||
382 | find -type f | grep -v ./CONTROL | sed -e 's/^\.//' > ${TMPDIR}${libdir_native}/opkg/info/${PSTAGE_PKGPN}.list | 386 | find -type f | grep -v ./CONTROL | sed -e 's/^\.//' > ${TMPDIR}${libdir_native}/opkg/info/${PSTAGE_PKGPN}.list |
383 | } | 387 | } |
384 | 388 | ||
385 | staging_package_libtoolhack () { | 389 | python staging_package_libtoolhack () { |
386 | # Deal with libtool not supporting sysroots and add our new | 390 | # Deal with libtool not supporting sysroots and add our new |
387 | # staging location | 391 | # staging location |
388 | for i in `find ${STAGING_DIR} -name "*.la" -type f` ; do \ | 392 | tmpdir = bb.data.getVar('TMPDIR', d, True) |
389 | sed -i -e s:FIXMESTAGINGDIR:${STAGING_DIR}:g $i | 393 | staging = bb.data.getVar('STAGING_DIR', d, True) |
390 | done | 394 | fixmefn = staging + "/fixmepath" |
395 | try: | ||
396 | fixmefd = open(fixmefn,"r") | ||
397 | fixmefiles = fixmefd.readlines() | ||
398 | fixmefd.close() | ||
399 | os.system('rm -f ' + fixmefn) | ||
400 | for file in fixmefiles: | ||
401 | os.system("sed -i -e s:FIXMESTAGINGDIR:%s:g %s" % (staging, tmpdir + '/' + file)) | ||
402 | except IOError: | ||
403 | pass | ||
391 | } | 404 | } |
392 | 405 | ||
393 | python do_package_stage () { | 406 | python do_package_stage () { |