diff options
| -rw-r--r-- | meta/classes/packaged-staging.bbclass | 33 | ||||
| -rw-r--r-- | meta/classes/staging.bbclass | 25 |
2 files changed, 3 insertions, 55 deletions
diff --git a/meta/classes/packaged-staging.bbclass b/meta/classes/packaged-staging.bbclass index fe4d938709..650d38bee4 100644 --- a/meta/classes/packaged-staging.bbclass +++ b/meta/classes/packaged-staging.bbclass | |||
| @@ -288,31 +288,6 @@ python packagedstage_stampfixing_eventhandler() { | |||
| 288 | return NotHandled | 288 | return NotHandled |
| 289 | } | 289 | } |
| 290 | 290 | ||
| 291 | populate_sysroot_preamble () { | ||
| 292 | if [ "$PSTAGING_ACTIVE" = "1" ]; then | ||
| 293 | stage-manager -p ${STAGING_DIR} -c ${PSTAGE_WORKDIR}/stamp-cache-staging -u || true | ||
| 294 | fi | ||
| 295 | } | ||
| 296 | |||
| 297 | populate_sysroot_postamble () { | ||
| 298 | if [ "$PSTAGING_ACTIVE" = "1" ]; then | ||
| 299 | # list the packages currently installed in staging | ||
| 300 | # ${PSTAGE_LIST_CMD} | awk '{print $1}' > ${PSTAGE_WORKDIR}/installed-list | ||
| 301 | |||
| 302 | # exitcode == 5 is ok, it means the files change | ||
| 303 | set +e | ||
| 304 | stage-manager -p ${STAGING_DIR} -c ${PSTAGE_WORKDIR}/stamp-cache-staging -u -d ${PSTAGE_TMPDIR_STAGE}/sysroots | ||
| 305 | exitcode=$? | ||
| 306 | if [ "$exitcode" != "5" -a "$exitcode" != "0" ]; then | ||
| 307 | exit $exitcode | ||
| 308 | fi | ||
| 309 | if [ "$exitcode" != "5" -a "$exitcode" != "0" ]; then | ||
| 310 | exit $exitcode | ||
| 311 | fi | ||
| 312 | set -e | ||
| 313 | fi | ||
| 314 | } | ||
| 315 | |||
| 316 | packagedstaging_fastpath () { | 291 | packagedstaging_fastpath () { |
| 317 | if [ "$PSTAGING_ACTIVE" = "1" ]; then | 292 | if [ "$PSTAGING_ACTIVE" = "1" ]; then |
| 318 | mkdir -p ${PSTAGE_TMPDIR_STAGE}/sysroots/ | 293 | mkdir -p ${PSTAGE_TMPDIR_STAGE}/sysroots/ |
| @@ -321,14 +296,6 @@ packagedstaging_fastpath () { | |||
| 321 | } | 296 | } |
| 322 | 297 | ||
| 323 | do_populate_sysroot[dirs] =+ "${PSTAGE_DIR}" | 298 | do_populate_sysroot[dirs] =+ "${PSTAGE_DIR}" |
| 324 | python populate_sysroot_prehook() { | ||
| 325 | bb.build.exec_func("populate_sysroot_preamble", d) | ||
| 326 | } | ||
| 327 | |||
| 328 | python populate_sysroot_posthook() { | ||
| 329 | bb.build.exec_func("populate_sysroot_postamble", d) | ||
| 330 | } | ||
| 331 | |||
| 332 | 299 | ||
| 333 | staging_packager () { | 300 | staging_packager () { |
| 334 | 301 | ||
diff --git a/meta/classes/staging.bbclass b/meta/classes/staging.bbclass index 0b2e457a93..4f398652be 100644 --- a/meta/classes/staging.bbclass +++ b/meta/classes/staging.bbclass | |||
| @@ -1,10 +1,3 @@ | |||
| 1 | python populate_sysroot_prehook () { | ||
| 2 | return | ||
| 3 | } | ||
| 4 | |||
| 5 | python populate_sysroot_posthook () { | ||
| 6 | return | ||
| 7 | } | ||
| 8 | 1 | ||
| 9 | packagedstaging_fastpath () { | 2 | packagedstaging_fastpath () { |
| 10 | : | 3 | : |
| @@ -81,6 +74,7 @@ do_populate_sysroot[dirs] = "${STAGING_DIR_TARGET}/${bindir} ${STAGING_DIR_TARGE | |||
| 81 | ${STAGING_BINDIR_NATIVE} ${STAGING_LIBDIR_NATIVE} \ | 74 | ${STAGING_BINDIR_NATIVE} ${STAGING_LIBDIR_NATIVE} \ |
| 82 | ${STAGING_INCDIR_NATIVE} \ | 75 | ${STAGING_INCDIR_NATIVE} \ |
| 83 | ${STAGING_DATADIR} \ | 76 | ${STAGING_DATADIR} \ |
| 77 | ${SYSROOT_DESTDIR}${STAGING_DIR_TARGET} \ | ||
| 84 | ${S} ${B}" | 78 | ${S} ${B}" |
| 85 | 79 | ||
| 86 | # Could be compile but populate_sysroot and do_install shouldn't run at the same time | 80 | # Could be compile but populate_sysroot and do_install shouldn't run at the same time |
| @@ -101,33 +95,20 @@ python do_populate_sysroot () { | |||
| 101 | # Otherwise setup a destdir, copy the results from do_install | 95 | # Otherwise setup a destdir, copy the results from do_install |
| 102 | # and run the staging preprocess against that | 96 | # and run the staging preprocess against that |
| 103 | # | 97 | # |
| 104 | pstageactive = (bb.data.getVar("PSTAGING_ACTIVE", d, True) == "1") | ||
| 105 | lockfile = bb.data.getVar("SYSROOT_LOCK", d, True) | ||
| 106 | stagefunc = bb.data.getVar('do_stage', d, True) | ||
| 107 | |||
| 108 | dest = bb.data.getVar('D', d, True) | ||
| 109 | sysrootdest = bb.data.expand('${SYSROOT_DESTDIR}${STAGING_DIR_TARGET}', d) | ||
| 110 | bb.mkdirhier(sysrootdest) | ||
| 111 | 98 | ||
| 112 | bb.build.exec_func("sysroot_stage_all", d) | 99 | bb.build.exec_func("sysroot_stage_all", d) |
| 113 | #os.system('cp -pPR %s/* %s/' % (dest, sysrootdest)) | ||
| 114 | for f in (bb.data.getVar('SYSROOT_PREPROCESS_FUNCS', d, True) or '').split(): | 100 | for f in (bb.data.getVar('SYSROOT_PREPROCESS_FUNCS', d, True) or '').split(): |
| 115 | bb.build.exec_func(f, d) | 101 | bb.build.exec_func(f, d) |
| 116 | bb.build.exec_func("packagedstaging_fastpath", d) | 102 | bb.build.exec_func("packagedstaging_fastpath", d) |
| 117 | 103 | ||
| 104 | lockfile = bb.data.getVar("SYSROOT_LOCK", d, True) | ||
| 118 | lock = bb.utils.lockfile(lockfile) | 105 | lock = bb.utils.lockfile(lockfile) |
| 119 | os.system(bb.data.expand('cp -pPR ${SYSROOT_DESTDIR}${TMPDIR}/* ${TMPDIR}/', d)) | 106 | os.system(bb.data.expand('cp -pPR ${SYSROOT_DESTDIR}${TMPDIR}/* ${TMPDIR}/', d)) |
| 120 | bb.utils.unlockfile(lock) | 107 | bb.utils.unlockfile(lock) |
| 121 | } | 108 | } |
| 122 | 109 | ||
| 123 | def is_legacy_staging(d): | ||
| 124 | stagefunc = bb.data.getVar('do_stage', d, True) | ||
| 125 | if stagefunc is None: | ||
| 126 | return False | ||
| 127 | return True | ||
| 128 | |||
| 129 | python () { | 110 | python () { |
| 130 | if is_legacy_staging(d): | 111 | if bb.data.getVar('do_stage', d, True) is not None: |
| 131 | bb.fatal("Legacy staging found for %s as it has a do_stage function. This will need conversion to a do_install or often simply removal to work with Poky" % bb.data.getVar("FILE", d, True)) | 112 | bb.fatal("Legacy staging found for %s as it has a do_stage function. This will need conversion to a do_install or often simply removal to work with Poky" % bb.data.getVar("FILE", d, True)) |
| 132 | } | 113 | } |
| 133 | 114 | ||
