]> code.ossystems Code Review - openembedded-core.git/commitdiff
staging: Remove now unused legacy staging code
authorRichard Purdie <rpurdie@linux.intel.com>
Thu, 29 Jul 2010 22:03:45 +0000 (15:03 -0700)
committerRichard Purdie <rpurdie@linux.intel.com>
Fri, 30 Jul 2010 13:41:45 +0000 (14:41 +0100)
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
meta/classes/packaged-staging.bbclass
meta/classes/staging.bbclass

index fe4d938709a577f6eb950862f1d9a2b6b801d939..650d38bee4470666c14719f3dea053ddd67aa339 100644 (file)
@@ -288,31 +288,6 @@ python packagedstage_stampfixing_eventhandler() {
     return NotHandled
 }
 
-populate_sysroot_preamble () {
-       if [ "$PSTAGING_ACTIVE" = "1" ]; then
-               stage-manager -p ${STAGING_DIR} -c ${PSTAGE_WORKDIR}/stamp-cache-staging -u || true
-       fi
-}
-
-populate_sysroot_postamble () {
-       if [ "$PSTAGING_ACTIVE" = "1" ]; then
-               # list the packages currently installed in staging
-               # ${PSTAGE_LIST_CMD} | awk '{print $1}' > ${PSTAGE_WORKDIR}/installed-list
-
-               # exitcode == 5 is ok, it means the files change
-               set +e
-               stage-manager -p ${STAGING_DIR} -c ${PSTAGE_WORKDIR}/stamp-cache-staging -u -d ${PSTAGE_TMPDIR_STAGE}/sysroots
-               exitcode=$?
-               if [ "$exitcode" != "5" -a "$exitcode" != "0" ]; then
-                       exit $exitcode
-               fi
-               if [ "$exitcode" != "5" -a "$exitcode" != "0" ]; then
-                       exit $exitcode
-               fi
-               set -e
-       fi
-}
-
 packagedstaging_fastpath () {
        if [ "$PSTAGING_ACTIVE" = "1" ]; then
                mkdir -p ${PSTAGE_TMPDIR_STAGE}/sysroots/
@@ -321,14 +296,6 @@ packagedstaging_fastpath () {
 }
 
 do_populate_sysroot[dirs] =+ "${PSTAGE_DIR}"
-python populate_sysroot_prehook() {
-    bb.build.exec_func("populate_sysroot_preamble", d)
-}
-
-python populate_sysroot_posthook() {
-    bb.build.exec_func("populate_sysroot_postamble", d)
-}
-
 
 staging_packager () {
 
index 0b2e457a93faf05f7a620c4fa71323f310aec9f8..4f398652be51e166788a3b76ff8d2759bef63d37 100644 (file)
@@ -1,10 +1,3 @@
-python populate_sysroot_prehook () {
-       return
-}
-
-python populate_sysroot_posthook () {
-       return
-}
 
 packagedstaging_fastpath () {
        :
@@ -81,6 +74,7 @@ do_populate_sysroot[dirs] = "${STAGING_DIR_TARGET}/${bindir} ${STAGING_DIR_TARGE
                             ${STAGING_BINDIR_NATIVE} ${STAGING_LIBDIR_NATIVE} \
                             ${STAGING_INCDIR_NATIVE} \
                             ${STAGING_DATADIR} \
+                             ${SYSROOT_DESTDIR}${STAGING_DIR_TARGET} \
                             ${S} ${B}"
 
 # Could be compile but populate_sysroot and do_install shouldn't run at the same time
@@ -101,33 +95,20 @@ python do_populate_sysroot () {
     # Otherwise setup a destdir, copy the results from do_install
     # and run the staging preprocess against that
     #
-    pstageactive = (bb.data.getVar("PSTAGING_ACTIVE", d, True) == "1")
-    lockfile = bb.data.getVar("SYSROOT_LOCK", d, True)
-    stagefunc = bb.data.getVar('do_stage', d, True)
-
-    dest = bb.data.getVar('D', d, True)
-    sysrootdest = bb.data.expand('${SYSROOT_DESTDIR}${STAGING_DIR_TARGET}', d)
-    bb.mkdirhier(sysrootdest)
 
     bb.build.exec_func("sysroot_stage_all", d)
-    #os.system('cp -pPR %s/* %s/' % (dest, sysrootdest))
     for f in (bb.data.getVar('SYSROOT_PREPROCESS_FUNCS', d, True) or '').split():
         bb.build.exec_func(f, d)
     bb.build.exec_func("packagedstaging_fastpath", d)
 
+    lockfile = bb.data.getVar("SYSROOT_LOCK", d, True)
     lock = bb.utils.lockfile(lockfile)
     os.system(bb.data.expand('cp -pPR ${SYSROOT_DESTDIR}${TMPDIR}/* ${TMPDIR}/', d))
     bb.utils.unlockfile(lock)
 }
 
-def is_legacy_staging(d):
-    stagefunc = bb.data.getVar('do_stage', d, True)
-    if stagefunc is None:
-        return False
-    return True
-
 python () {
-    if is_legacy_staging(d):
+    if bb.data.getVar('do_stage', d, True) is not None:
         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))
 }